title: HTTPClient Post Request with Headers and Body
body: <p>I want to set the Content-Type and Authorization Headers using HttpClient and want to load the xml file for the body(request) and send Post request.</p>
  
  <p>I have searched for combining both headers and body for Post request. </p>
  
  <p>Setting up the Headers using HttpRequestMessage.</p>
  
  <pre><code>   HttpClient clientTest = new HttpClient();
  
     HttpRequestMessage httpRequest = new HttpRequestMessage(HttpMethod.Post,url);
  
  
     httpRequest.Content = new StringContent(string.Empty, Encoding.UTF8, "application/vnd.citrix.sessionparams+xml");
     httpRequest.Headers.Authorization = new AuthenticationHeaderValue("CitrixAuth", "H4sIAAAAAAAEAK1X2Y6jyBL9lZLnEbnZt1J");
  </code></pre>
  
  <p>Setting the xml body - </p>
  
  <pre><code>XDocument xml = XDocument.Load("RequestSession.xml");
  </code></pre>
  
  <p>Converting to Document.ToString()</p>
  
  <pre><code>var httpContent = new StringContent(xml.Document.ToString(), Encoding.UTF8, "application/vnd.citrix.sessionstate+xml");
  </code></pre>
  
  <p>Please help me with combining both headers and body for Post Request using HttpClient.</p>