title: Setting HttpWebRequest Header
body: <p>I would like to send a POST request to a specified Endpoint. And for the authorisation I'have to set a "x-api-key: key-value pair to the header of my request.</p>
  
  <p>This is what I'm using:</p>
  
  <pre><code>public string postXMLData(string destinationUrl, string requestXml)
          {
  
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(destinationUrl);
  
              byte[] bytes;
              bytes = System.Text.Encoding.ASCII.GetBytes(requestXml);
              request.ContentType = "text/xml; encoding='utf-8'";
              request.ContentLength = bytes.Length;
              request.Method = "POST";
  
  ...
  </code></pre>