Closed nightroman closed 8 years ago
Tried on v4 and v5, it works. It may be v3 issue.
I'll probably just remove the header sample - while it's correct, it's not really necessary. Invoke-RestMethod without it will still get the same results. It's really only needed for something that implements the ability for the client to change the content type based on the requesting headers.
Wound up leaving the -headers. The problem is that without them, the system freezes when running the script after the post example. I can add a sleep to fix it, but instead I simply added a comment that in V3 and earlier you cannot use these headers. I also added a note that it will work without those headers in v3. No note about the unexpected behaviors that might happen, but I think it's ok.
It's probably work in progress but I better let you know. On invoking example.ps1 I get the below errors. I am using PowerShell v3, if it matters.