flask-io
flask-io copied to clipboard
add specific headers in flask-io response
Hello @viniciuschiele
I'd like to be able to set headers on pre-made flask-io response. I've just added a parameters headers on all of them.
Cheers,
Thibault
Yeah, that is good to have.
As a workaround, you can set the headers after calling io.bad_request
e.g:
response = io.bad_request(data)
response.headers.add("content-type", "application/json")
return response