Date request header is missing from http request(UnityWebrequest)

I am trying to send a GET request to an API that requires the Date request header.

However UnityWebRequest does not send it automatically (I have checked with https://requestb.in/) and I cannot set it manually since “date” is one of the protected headers.

I am able to communicate with the API successfully if I use the WWW class (which does allow me to set the “date” header manually) but am trying to do the same with the UnityWebRequest since WWW will be deprecated eventually.

So, how can I make sure that the “date” request header is sent?

Is there a solution or do I have to use an object from a different library such as .NET’s HttpWebRequest?

Thanks

There are multiple issues here. First UnityWebRequest is not sending the “Date” header and secondly you are not allowed (since Unity 2017.1) to set it manually anymore. I found a workaround setting the lower case “date” header instead of “Date”. Its terrible I know, but there are service like Vuforia Cloud API that require the “date” header and must be set from client side because used in the signature: