application = Flask(__name__)

@application.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        the_data = request.get_json()
return 'This was a POST request, how interesting...'
How to accept a JSON POST?