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

Impossible to override default headers #471

Open
williamlian opened this issue Sep 27, 2018 · 1 comment
Open

Impossible to override default headers #471

williamlian opened this issue Sep 27, 2018 · 1 comment

Comments

@williamlian
Copy link

httpReq.Header.Add(headerKey, headerValue)

New headers are always "added" to the default one. This makes it impossible to override headers. For example, I have a default source header as "foo", but in my client code, I passed my header with source: bar. The result in this code will be source: foo, bar which will cause trouble if the remote endpoint checks for specific source. Can we have some mechanism to allow header override?

@ChuntaoLu
Copy link
Contributor

Would not setting the default headers for the client solve the problem?

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

No branches or pull requests

2 participants