-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Blazor WASM: HttpClient.SendAsync does not set the RequestMessage in ResponseMessage #42691
Comments
Dotnet-GitSync-Bot
added
area-System.Net.Http
untriaged
New issue has not been triaged by the area owner
labels
Sep 24, 2020
Tagging subscribers to this area: @dotnet/ncl |
FYI @kjpou1 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When
SendAsync
is called onHttpClient
, theHttpResponseMessage.RequestMessage
is null when theHttpClient
is in Blazor WASM, but not null (and equal to the original HttpRequestMessage) on NET Core.In NET Core, we do:
In Blazor WASM, we have the
HttpClient
registered as:And in a Blazor page:
To Reproduce
Sample code in this repo: https://github.com/ealsur/httpclientwasm
Running the Console app, the output is:
https://github.com/ealsur/httpclientwasm/blob/master/ConsoleApp/Program.cs#L19
Running the Blazor WASM app and browsing to Fetch Data, shows the output in the Browser Console:
https://github.com/ealsur/httpclientwasm/blob/master/Blazor/Pages/FetchData.razor#L48
The text was updated successfully, but these errors were encountered: