title: Is it possible to set the Default Content-Type to "application/json;v=2.0"
body: <p>Is it possible to set the Default Content-Type to "application/json;v=2.0". I say default because I'm using a HttpClient class and I use the DefaultRequestHeaders to set my proxies to default values.</p>
  
  <p>I followed this example to create my headers <a href="https://stackoverflow.com/a/10679340/196526">https://stackoverflow.com/a/10679340/196526</a> but I also use versioning and information about versioning is saved in ContenT-Type</p>
  
  <pre><code>public class BankAccountProxy
  {
      public void SetToken()
      {
          Client = new HttpClient();
          Client.BaseAddress = new Uri(System.Configuration.ConfigurationManager.AppSettings["ApiRoute"]);
          Client.DefaultRequestHeaders.Accept.Clear();
          Client.DefaultRequestHeaders.Add("Token", ApiInformations.ApiToken);
          Client.DefaultRequestHeaders
              .Accept
              .Add(new MediaTypeWithQualityHeaderValue($"application/json;v=2.0"));
      }
  
      public async Task&lt;IEnumerable&lt;BankAccount&gt;&gt; Get()
      {
          HttpResponseMessage response = await Client.GetAsync($"/api/BankAccount/");
          response.EnsureSuccessStatusCode();
          IEnumerable&lt;BankAccount&gt; bankAccount;
          bankAccount = await response.Content.ReadAsAsync&lt;IEnumerable&lt;BankAccount&gt;&gt;();
          return bankAccount;
      }
  }
  </code></pre>
  
  <p>When I run this code I get a</p>
  
  <blockquote>
    <p>Exception message: The format of value 'application/json;v=2.0' is
    invalid.</p>
  </blockquote>
  
  <p>Because of the v=2.0 that is probably not a valid MediaTypeWithQualityHeaderValue.</p>
  
  <p>What I want is to be sure I always send the version information in my Content-Type header value. How can I initialize it? How can I tell my code my default content type is not a quality header but a valid one. </p>
  
  <p>For information here is my query perfectly working on Postman:</p>
  
  <p><a href="https://i.stack.imgur.com/AgFCj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AgFCj.png" alt="enter image description here"></a></p>