We\'re using Flask for one of our API\'s and I was just wondering if anyone knew how to return a HTTP response 201?
For errors such as 404 we can call:
You can do
result = {'a': 'b'} return jsonify(result), 201
if you want to return a JSON data in the response along with the error code You can read about responses here and here for make_response API details