Receive JSON In A Python Flask Server

July - 2021

use

request.get_json()

e.g.

@app.route('/post/data',methods=['GET','POST'])
def postdata():
    jsonData = request.get_json()
    print jsonData['name']
    print jsonData['age']
    return "hello world" #or whatever you want to return