You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invoke-WebRequest using Get method doesn't allow content-body #2054
Making a HTTP GET requests using either Invoke-WebRequest or Invoke-RestMethod with a content-body throws an exception. HTTP RFC 7231 describes that a content-body is allowed even though the response of the webserver might be
A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.
This is making it difficult to interface with various RESTful API's like InfoBlox and ElasticSearch that rely on JSON payloads for retrieving data.
Activity
adamdriscoll commentedon Aug 25, 2016
This is a limitation of the .NET class that Invoke-WebRequest is using. Not sure what the best way would be to work around it.
rkeithhill commentedon Aug 25, 2016
File this bug/enhancement request on the CoreFx repo?
thiezn commentedon Aug 28, 2016
Thanks, I've raised the issue on the CoreFX repo:
dotnet/corefx#11211