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:
So, if you are using flask_restful Package for API's returning 201 would becomes like
flask_restful
def bla(*args, **kwargs): ... return data, 201
where data should be any hashable/ JsonSerialiable value, like dict, string.
data