I'm trying to call a REST service that requires a Date
header in the request. When I try something like
Invoke-RestMethod -Uri "http://path/to/my/service" -Header @{"Date"="Fri, 20 Mar 2015 16:00:00 GMT"}
I get an error
The 'Date' header must be modified using the appropriate property or method.
I found this question which addresses similar problems with a WebRequest in C#. I can't use HeaderProperty
here (which appears to be the C# fix) -- is there anything else, or am I just unable to call this service from PowerShell?