Assuming you've posted valid JSON with the application/json
content type, request.json
will have the parsed JSON data.
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/echo', methods=['POST'])
def hello():
return jsonify(request.json)