title: Modifying format of Date request header in HttpClient on post
body: <p>I'm trying to post to a url, and I'm using the HttpClient class to do it. I'm having an issue setting the Date header.</p>
  
  <p>At first I was just letting .NET handle the date. But apparently for this url that I'm posting to, the date header needs to be in a specific format, so I tried changing it.</p>
  
  <pre><code>HttpClient client = new HttpClient();
  
  //client.DefaultRequestHeaders.Date = currentDate;
  client.DefaultRequestHeaders.Add("Date", currentDate.ToString("MMM dd HH:mm:ss yyyy"));
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>System.FormatException: The format of value 'Dec 30 15:00:00 2015' is invalid.</p>
  </blockquote>
  
  <p>I tried changing it to a simpler format of "dd/MM/yyyy", but I still get the same error.</p>
  
  <p>Is there any way for me to modify that Date header?</p>