Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add specific headers in flask-io response #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tvallois
Copy link

@tvallois tvallois commented Oct 24, 2019

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

@viniciuschiele
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants