title: How do I set multiple headers using PostAsync in C#?
body: <p>I have some working code:</p>
  
  <pre><code>using (var client = new HttpClient())
  {
  HttpResponseMessage response;
  response = client.PostAsync(Url, new StringContent(Request, Encoding.UTF8, header)).Result;
  }
  </code></pre>
  
  <p>// the above works fine for a simple header, e.g. "application/json"</p>
  
  <p>What do I do, if I want to have multiple headers? E.g. adding "myKey", "foo" pair and "Accept", "image/foo1"</p>
  
  <p>If I try adding the following before the .Result line, intellisense complains (the word 'Headers' is in red with "Can't resolve symbol 'Headers'":</p>
  
  <pre><code>client.Headers.Add("myKey", "foo");
  client.Headers.Add("Accept", "image/foo1");
  </code></pre>