title: C# httprequest headers wiht a colon .Net 4.0
body: <p>When inspecting a third party api using chrome browser's F12 tool I found there are several interesting headers listed:</p>
  
  <pre><code>:authority:m.somedomain.com
  :method:GET
  :path:/api/somevalues
  :scheme:https
  </code></pre>
  
  <p>Along with some headers I'm familiar with, such as accept, accept-encoding, etc.</p>
  
  <p>I'm using .Net 4.0 to make http/https requests. When trying to add these headers starting with a colon, an error is thrown on the first item:</p>
  
  <pre><code>        httpRequest.Headers.Add(":authority", "m.somedomain.com");
          httpRequest.Headers.Add(":method", "get");
          httpRequest.Headers.Add(":path", sPath);
          httpRequest.Headers.Add(":scheme", "https");
  </code></pre>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>Specified value has invalid HTTP Header characters.</p>
  </blockquote>
  
  <p>After some searching I found article talking about http/2. However in .NET 4.0 there are only http/1.0 and http/1.1 available. </p>
  
  <p>Does that mean I need to upgrade to newer .NET version?</p>
  
  <p>Thanks in advance.</p>