posted data to flask

from flask import Flask, request, jsonify

app = Flask(__name__)

def post():
    res = request.json
    return jsonify(res)

Here is what the above code is Doing:
1. We import the Flask class from the flask module.
2. We create an instance of the Flask class.
3. We use the route() decorator to tell Flask what URL should trigger our function.
4. The function is given a name which is also used to generate URLs for that particular function, and returns the message we want to display in the user’s browser.
5. We use the run() function to run the Flask application.