title: HttpClient postAsync with xml body ends with BadRequest error
body: <p>I want to post the xml string message to server but it is ending up with the bad request.
  Seems to be a very simple but not getting what miskake I am doing?</p>
  
  <p>please help. :(</p>
  
  <p><strong><em>msgXML is a stringified xml</em></strong></p>
  
  <pre><code> public static async Task&lt;string&gt; SendMessageAsync(string msgXml)
   {
    using (CancellationTokenSource source = new CancellationTokenSource())
    {
      CancellationToken cancellation = source.Token;
      HttpClient client = HttpClientProvider.GetInstance;
      //client.BaseAddress = new Uri(myUri);
      client.DefaultRequestHeaders.Accept.Add(new 
      MediaTypeWithQualityHeaderValue("application/xml"));
      client.DefaultRequestHeaders.Add("X-HTTP-Dest-Address", destinationAddress);
      client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/xml;charset=utf-8");
      var httpContent = new StringContent(msgXml, Encoding.UTF8, "application/xml");
  
      HttpResponseMessage httpResponse = await client.PostAsync(myUri, httpContent, cancellationToken).ConfigureAwait(false);
      if (!httpResponse.IsSuccessStatusCode)
       {
         throw new Exception("Invalid URI");
       }
    }
  }
  </code></pre>
  
  <p>My msgXML:</p>
  
  <pre><code>&lt;MSG&gt;
   &lt;HeaderCommon&gt;
    other elements....
    &lt;payload&gt;&lt;/payload&gt;
   &lt;/HeaderCommon&gt;
  &lt;/MSG&gt;
  </code></pre>
  
  <p>The error i am getting is only:</p>
  
  <pre><code>    ReasonPhrase: "Bad Request"
      statusCode: 400
  </code></pre>
  
  <p>The server is not secure(http).</p>