Blazor/WebAssembly - Sending JSON body inside GET Request

Деян Цонев 21 Reputation points
2021-11-11T20:27:14.783+00:00

Dear Microsoft community,
When sending GET request with httpClient.SendAsync I get this error:"TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.".
Is there any way to workaround this, because I was hired to write frontend for web API which requires Get request with a body. My employer won't agree with any changes on the REST API
Thank you in advance!

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,664 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.