title: How to add HTTP Header to SOAP Client
body: <p>Can someone answer me if it is possible to add HTTP header to soap client web-service calls.
  After surfing Internet the only thin I found was how to add SOAP header.</p>
  
  <p>The code looks like this:</p>
  
  <pre><code>var client =new MyServiceSoapClient();
  //client.AddHttpHeader("myCustomHeader","myValue");//There's no such method, it's just for clearness
  var res = await client.MyMethod();
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre><code>The request should look like this
  POST https://service.com/Service.asmx HTTP/1.1
  Content-Type: text/xml; charset=utf-8
  SOAPAction: "http://www.host.com/schemas/Authentication.xsd/Action"
  Content-Length: 351
  MyHeader: "myValue"
  Expect: 100-continue
  Accept-Encoding: gzip, deflate
  Connection: Keep-Alive
  
  &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;s:Header/&gt;
    &lt;s:Body&gt;
      &lt;myBody&gt;BodyGoesHere&lt;/myBody&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>Header property in the envelop should be empty</p>