I am trying to make a HttpClient
POST request, and everything went well until the server requested that the header is
"Content-Type":"application/json"
but every request returns with an error.
After further investigation, the header is not being added.
I am adding the header using :
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", @"application/json");
Is there any way to add the header or am I adding it the wrong way?