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

[bugfix] Add headers in refresh_token flow #192

Merged

Conversation

elafarge
Copy link
Contributor

Indeed, we are sending default headers when fetching a token. I thought
it was logic to also send these same default headers (and offer our
users the possibility to set their own headers) in the refresh_token
method.

Also, one of the main reason for this is that some applications (the
Flowdock API for instance) do need those headers to return the
appropriate content :)

Indeed, we are sending default headers when fetching a token. I thought
it was logic to also send these same default headers (and offer our
users the possibility to set their own headers) in the `refresh_token`
method.

Also, one of the main reason for this is that some applications (the
Flowdock API for instance) do need those headers to return the
appropriate content :)
@elafarge
Copy link
Contributor Author

Hi there ! Any updates on this one ?

headers = headers or {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I recommend changing this logic so it only overrides the headers is headers is None? It would be useful to allow people to explicit request no additional headers.

@Lukasa Lukasa merged commit 2daddb0 into requests:master Dec 14, 2015
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.

None yet

2 participants