[X] Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
[X] Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
[X] Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
This applies to both Invoke-RestMethod and Invoke-WebRequest.
When passing query parameters as an argument to "Body" on a "Get" call, this cmdlet automatically URL encodes the query parameters. Please mention this. Please also explain that it encodes spaces with + signs instead of %20. This is important to note because not all APIs will accept this encoding. On verbose this cmdlet does not show you the payload it's sending to the API, so this is a massive headache to troubleshoot, as you can only learn this by inspecting the payload with your own HTTP listener.
Prerequisites
Get-Foo
cmdlet" instead of "Typo."Links
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.4 https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.4
Summary
This applies to both Invoke-RestMethod and Invoke-WebRequest.
When passing query parameters as an argument to "Body" on a "Get" call, this cmdlet automatically URL encodes the query parameters. Please mention this. Please also explain that it encodes spaces with + signs instead of %20. This is important to note because not all APIs will accept this encoding. On verbose this cmdlet does not show you the payload it's sending to the API, so this is a massive headache to troubleshoot, as you can only learn this by inspecting the payload with your own HTTP listener.
Details
No response
Suggested Fix
No response