error unhandled exception httpclient SendAsync

Viewed 22

I don't understand why I get this error when making the request and what to do to solve it. I've been trying to fix it for hours now.

var request = new HttpRequestMessage(HttpMethod.Get, strUrl);
request.SetBrowserRequestMode(BrowserRequestMode.NoCors);

var response = await _http.SendAsync(request);
return await response.Content.ReadFromJsonAsync<LiquidacionViewModel>();

System.NotSupportedException: The provided ContentType is not supported; the supported types are 'application/json' and the structured syntax suffix 'application/+json'.

0 Answers
Related