forked from orbit-oss/flask
clean up JSON code and docs
This commit is contained in:
parent
dbc70c9274
commit
e97253e4c1
5 changed files with 91 additions and 83 deletions
|
|
@ -267,7 +267,7 @@ def test_full_url_request(app, client):
|
|||
def test_json_request_and_response(app, client):
|
||||
@app.route('/echo', methods=['POST'])
|
||||
def echo():
|
||||
return jsonify(flask.request.json)
|
||||
return jsonify(flask.request.get_json())
|
||||
|
||||
with client:
|
||||
json_data = {'drink': {'gin': 1, 'tonic': True}, 'price': 10}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue