From 8c8cf1ca03a89c484c3dd3b714f8569d1b61485c Mon Sep 17 00:00:00 2001 From: Christopher Warrington Date: Wed, 13 Aug 2025 14:04:19 -0700 Subject: [PATCH 1/2] Copy edit Body parameter of Invoke-RestMethod The documentation for the `-Body` parameter of `Invoke-RestMethod` incorrectly uses "response" when it means "request". --- reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 729e5a7f16f..210a3134947 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -408,7 +408,7 @@ Specifies the body of the request. The body is the content of the request that f You can also pipe a body value to `Invoke-RestMethod`. The **Body** parameter can be used to specify a list of query parameters or specify the content of -the response. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method +the request. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method method to encode the key-value pairs. For more information about encoding strings for URLs, see [the UrlEncode() method reference](xref:System.Net.WebUtility.UrlEncode*). From e25041e8a2f2ad4bb9b03fa7d975192945e771d7 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 13 Aug 2025 14:41:20 -0700 Subject: [PATCH 2/2] Copy changes to all versions --- .../5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md | 3 ++- .../7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md | 2 +- .../7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index a6caad55b9d..4778d2ed768 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -184,8 +184,9 @@ Specifies the body of the request. The body is the content of the request that f You can also pipe a body value to `Invoke-RestMethod`. The **Body** parameter can be used to specify a list of query parameters or specify the content of -the response. +the . +request. When the input is a GET request, and the body is an IDictionary (typically, a hash table), the body is added to the URI as query parameters. For other request types (such as POST), the body is set as the value of the request body in the standard name=value format. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 9a378d02951..cd6d6461aa2 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -408,7 +408,7 @@ Specifies the body of the request. The body is the content of the request that f You can also pipe a body value to `Invoke-RestMethod`. The **Body** parameter can be used to specify a list of query parameters or specify the content of -the response. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method +the request. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method method to encode the key-value pairs. For more information about encoding strings for URLs, see [the UrlEncode() method reference](xref:System.Net.WebUtility.UrlEncode*). diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 935aeab87cc..c6e1f250d5c 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -408,7 +408,7 @@ Specifies the body of the request. The body is the content of the request that f You can also pipe a body value to `Invoke-RestMethod`. The **Body** parameter can be used to specify a list of query parameters or specify the content of -the response. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method +the request. For query parameters, the cmdlet uses the **System.Net.WebUtility.UrlEncode** method method to encode the key-value pairs. For more information about encoding strings for URLs, see [the UrlEncode() method reference](xref:System.Net.WebUtility.UrlEncode*).