-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Default Request Headers are double added on Android #28
Comments
I'll be damned, I though the .NET behavior was identical on all platforms. I'll take a look at #29, but I am currently on holiday and wont be able to release anything until tonight or tomorrow night. Is there a way for you to work around this issue until the new version is released? |
Nevermind, I'm using my own fork right now - at least until there is a fixed version released. |
I've released a preview on www.nuget.org. Would it be possible for you to verify that this preview is working in your environment? In case it does, I will continue with releasing the official version. |
👍 works with 1.0.2-sha-2b78963. |
The behavior on Mono is different from the behavior on .NET Framework or .NET Core, where a default request header that already exists on the request message is ignored. Closes #28
The new official v1.0.2 is now live on www.nuget.org. Thank you so much for reporting this issue, and good luck to you on your future development adventures! |
Thank you for the fast response and fix, all the best likewise :) |
Describe the bug
A HttpClient with
client.DefaultRequestHeaders.Add("x-api-key", myApiKey);
is signed correctly, but the client itself adds the header twice into the request:To Reproduce
Steps to reproduce the behavior:
Try this code:
You can see the request object before sending here.
Compare to the request object that is return in
response.RequestMessage
.Expected behavior
The Request Header should contain the header "x-api-key" only once. Like this:
Environment (please complete the following information):
Additional context
I have tested an .NET Core 2.1 Console application where everything runs fine.
The text was updated successfully, but these errors were encountered: