title: .NET HttpClient Request Content-Type
body: <p>I'm not sure, but it appears to me that the default implementation of .NET HttpClient library is flawed. It looks like it sets the Content-Type request value to "text/html" on a PostAsJsonAsync call. I've tried to reset the request value, but not sure if I'm doing this correctly. Any suggestions.</p>
  
  <pre><code>public async Task&lt;string&gt; SendPost(Model model)
  {
      var client = new HttpClient();
      client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
      var response = await client.PostAsJsonAsync(Url + "api/foo/", model);
      response.EnsureSuccessStatusCode();
      return await response.Content.ReadAsStringAsync();    
  }
  </code></pre>