Send JSON-Request to Flask via Curl [duplicate]
According to the get_json docs: [..] function will return None if the mimetype is not application/json but this can be overridden by the force parameter. So, either specify the mimetype of the incoming request to be application/json: curl localhost:5000/post -d ‘{“foo”: “bar”}’ -H ‘Content-Type: application/json’ or force JSON decoding with force=True: data = request.get_json(force=True) If … Read more