Skip to content
Myr

Merge pull request #946 from allevo/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Use json method of requests.Response

authored by Armin Ronacher · committed by Armin Ronacher · parents 58b4fc2, b81b040 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:examples/persona/persona.py+2 added-2 removed
1from flask import Flask, render_template, session, request, json, abort, g1from flask import Flask, render_template, session, request, abort, g23import requests45
31 unmodified lines
37 'assertion': request.form['assertion'],38 'audience': request.host_url,39 }, verify=True)40 if resp.ok:41 verification_data = json.loads(resp.content)41 verification_data = resp.json()42 if verification_data['status'] == 'okay':43 session['email'] = verification_data['email']44 return 'OK'45
14 unmodified lines