title: Forcing HttpClient to use Content-Type: text/xml
body: <p>This is driving me nuts, I am setting the ContentType header everywhere I can and can't seem to make it stop sending text/plain. </p>
  
  <p>Watching the data in Fiddler, the request is always requesting:</p>
  
  <p>POST http:/domain.com HTTP/1.1</p>
  
  <p>Content-Type: text/plain; charset=utf-8</p>
  
  <pre><code>using (var httpClient = new HttpClient())
  {
      var request = new HttpRequestMessage(HttpMethod.Post, "http://domain.com");
          request.Content = new StringContent(Serialize(obj), Encoding.UTF8, "text/xml");
          request.Content.Headers.Clear();
          request.Content.Headers.ContentType = new MediaTypeHeaderValue("text/xml");
          request.Headers.Clear();
          request.Headers.Add("Content-Type","text/xml");
          var response = await httpClient.SendAsync(request);
          return  await response.Content.ReadAsStringAsync();
  }
  </code></pre>