title: C# Add Accept header to HttpClient
body: <p>What is the difference between these two calls? My end goal is to have
  <code>Accept: application/json</code> sent over the wire, not to append to some default set of other MIME types.</p>
  
  <pre><code>HttpClient client = new HttpClient();
  client.DefaultRequestHeaders.Add("Accept", "application/json");
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>client.DefaultRequestHeaders
    .Accept
    .Add(new MediaTypeWithQualityHeaderValue("application/json"));
  </code></pre>
  
  <p>My CLR is .NET Core 2.0.</p>
  
  <p>Sniffing the wire reveals no difference:</p>
  
  <pre class="lang-sh prettyprint-override"><code># just .Add("Accept"...
  ~ % nc -l 8000
  GET / HTTP/1.1
  Connection: Keep-Alive
  Accept: application/json
  [...]
  
  # with MediaTypeWithQualityHeaderValue
  ~ % nc -l 8000
  GET / HTTP/1.1
  Connection: Keep-Alive
  Accept: application/json
  [...]
  </code></pre>
  
  <p>So, outside the bizarre naming of that type, nothing else to gain here right?</p>