Does anyone knows of a way to set or read the 'Date' HTTP header in an HTTP GET request on Windows Phone 8?
I need to be able to set the value of the Date header or at least read the value that will actually be sent in the request.
I have tried with something like:
var web_request = HttpWebRequest.CreateHttp(url);
web_request.Headers["Date"] = the_date;
But this produces an exception at run time: System.ArgumentException: The 'Date' header must be modified using the appropriate property or method.
There's sample code here with HttpClient but this is apparently not available under Windows Phone 8: How do you set the Content-Type header for an HttpClient request?
I have tried reading the date as well but after:
var web_request = HttpWebRequest.CreateHttp(url);
The date does not seem to be set yet.