Skip to content

add specific headers in flask-io response - #4

Open
tvallois wants to merge 3 commits into
viniciuschiele:masterfrom
tvallois:master
Open

add specific headers in flask-io response#4
tvallois wants to merge 3 commits into
viniciuschiele:masterfrom
tvallois:master

Conversation

@tvallois

@tvallois tvallois commented Oct 24, 2019

Copy link
Copy Markdown

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
Copy Markdown
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