Answers for "the request entity's media type 'text/plain' is not supported for this resource"

0

the request entity's media type 'text/plain' is not supported for this resource

var json = JsonConvert.SerializeObject(body);
var content = new StringContent(json);
content.Headers.ContentType= new MediaTypeHeaderValue("application/json");
return _client.PostAsync(requestUri, content);

https://bartwullems.blogspot.com/2018/12/aspnet-web-apimediatype-exception-on.html
POSTED BY BART WULLEMS
Posted by: Guest on July-12-2021

Code answers related to "the request entity's media type 'text/plain' is not supported for this resource"

Browse Popular Code Answers by Language