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
Copy file name to clipboardExpand all lines: reference/6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,7 @@ Allows sending of credentials and secrets over unencrypted connections. By defau
177
177
178
178
> **Warning**: Using this parameter is not secure and is not recommended. It is provided only for compatibility with legacy systems that cannot provide encrypted connections. Use at your own risk.
179
179
180
+
This feature was added in PowerShell 6.0.0.
180
181
181
182
```yaml
182
183
Type: SwitchParameter
@@ -202,6 +203,7 @@ Available Authentication Options:
202
203
203
204
Supplying **-Authentication** will override any `Authorization` headers supplied to **-Headers** or included in **-WebSession**.
204
205
206
+
This feature was added in PowerShell 6.0.0.
205
207
206
208
```yaml
207
209
Type: WebAuthenticationType
@@ -228,7 +230,7 @@ For other request types (such as POST), the body is set as the value of the requ
228
230
229
231
When the body is a form, or it is the output of another `Invoke-WebRequest` call, PowerShell sets the request content to the form fields.
230
232
231
-
The **-Body** parameter may also accept a `System.Net.Http.MultipartFormDataContent` object. This will facilitate `multipart/form-data` requests. When a `MultipartFormDataContent` object is supplied for **-Body**, any Content related headers supplied to the **-ContentType**, **-Headers**, or **-WebSession** parameters will be overridden by the Content headers of the `MultipartFormDataContent` object.
233
+
The **-Body** parameter may also accept a `System.Net.Http.MultipartFormDataContent` object. This will facilitate `multipart/form-data` requests. When a `MultipartFormDataContent` object is supplied for **-Body**, any Content related headers supplied to the **-ContentType**, **-Headers**, or **-WebSession** parameters will be overridden by the Content headers of the `MultipartFormDataContent` object. This feature was added in PowerShell 6.0.0.
232
234
233
235
```yaml
234
236
Type: Object
@@ -249,8 +251,6 @@ Enter a variable that contains a certificate or a command or expression that get
249
251
To find a certificate, use `Get-PfxCertificate` or use the `Get-ChildItem` cmdlet in the Certificate (`Cert:`) drive.
250
252
If the certificate is not valid or does not have sufficient authority, the command fails.
251
253
252
-
> **Note**: This feature may not work on OS platforms where `libcurl` is configured with a TLS provider other than OpenSSL.
@@ -372,6 +374,8 @@ Indicates the cmdlet should follow relation links.
372
374
373
375
To set how many times to follow relation links, use the **-MaximumFollowRelLink** parameter.
374
376
377
+
This feature was added in PowerShell 6.0.0.
378
+
375
379
```yaml
376
380
Type: SwitchParameter
377
381
Parameter Sets: (All)
@@ -599,6 +603,8 @@ Indicates the cmdlet should preserve the `Authorization` header, when present, a
599
603
600
604
By default, the cmdlet strips the `Authorization` header before redirecting. Specifying this parameter disables this logic for cases where the header needs to be sent to the redirection location.
Creates a Response Headers Dictionary and saves it in the value of the specified variable. The the keys of the dictionary will contain the field names of the Response Header returned by the web server and the values will be the respective field values.
671
679
680
+
This feature was added in PowerShell 6.0.0.
672
681
673
682
```yaml
674
683
Type: String
@@ -758,6 +767,7 @@ Skips certificate validation checks. This includes all validations such as expir
758
767
759
768
> **Warning**: Using this parameter is not secure and is not recommended. This switch is only intended to be used against known hosts using a self-signed certificate for testing purposes. Use at your own risk.
760
769
770
+
This feature was added in PowerShell 6.0.0.
761
771
762
772
```yaml
763
773
Type: SwitchParameter
@@ -778,6 +788,8 @@ This switch should be used for sites that require header values that do not conf
778
788
779
789
This will disable validation for values passed to the **-ContentType**, **-Headers** and **-UserAgent** parameters.
780
790
791
+
This feature was added in PowerShell 6.0.0.
792
+
781
793
```yaml
782
794
Type: SwitchParameter
783
795
Parameter Sets: (All)
@@ -795,7 +807,9 @@ Sets the SSL/TLS protocols that are permissible for the web request. By default
795
807
796
808
**-SslProtocol** uses the `WebSslProtocol` Flag Enum. It is possible to supply more than one protocol using flag notation or combining multiple `WebSslProtocol` options with `-bor`, however supplying multiple protocols is not supported on all platforms.
797
809
798
-
> **Note**: This feature may not work on OS platforms where `libcurl` is configured with a TLS provider other than OpenSSL.
810
+
> **Note**: On non-Windows platforms it may not be possible to supply `'Tls, Tls12'` as an option.
811
+
812
+
This feature was added in PowerShell 6.0.0.
799
813
800
814
```yaml
801
815
Type: WebSslProtocol
@@ -839,6 +853,8 @@ The OAuth or Bearer token to include in the request. **-Token** is required by c
Copy file name to clipboardExpand all lines: reference/6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,7 @@ Allows sending of credentials and secrets over unencrypted connections. By defau
192
192
193
193
> **Warning**: Using this parameter is not secure and is not recommended. It is provided only for compatibility with legacy systems that cannot provide encrypted connections. Use at your own risk.
194
194
195
+
This feature was added in PowerShell 6.0.0.
195
196
196
197
```yaml
197
198
Type: SwitchParameter
@@ -217,6 +218,7 @@ Available Authentication Options:
217
218
218
219
Supplying **-Authentication** will override any `Authorization` headers supplied to **-Headers** or included in **-WebSession**.
219
220
221
+
This feature was added in PowerShell 6.0.0.
220
222
221
223
```yaml
222
224
Type: WebAuthenticationType
@@ -241,7 +243,7 @@ The **-Body** parameter can be used to specify a list of query parameters or spe
241
243
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.
242
244
For other request types (such as POST), the body is set as the value of the request body in the standard name=value format.
243
245
244
-
The **-Body** parameter may also accept a `System.Net.Http.MultipartFormDataContent` object. This will facilitate `multipart/form-data` requests. When a `MultipartFormDataContent` object is supplied for **-Body**, any Content related headers supplied to the **-ContentType**, **-Headers**, or **-WebSession** parameters will be overridden by the Content headers of the `MultipartFormDataContent` object.
246
+
The **-Body** parameter may also accept a `System.Net.Http.MultipartFormDataContent` object. This will facilitate `multipart/form-data` requests. When a `MultipartFormDataContent` object is supplied for **-Body**, any Content related headers supplied to the **-ContentType**, **-Headers**, or **-WebSession** parameters will be overridden by the Content headers of the `MultipartFormDataContent` object. This feature was added in PowerShell 6.0.0.
245
247
246
248
```yaml
247
249
Type: Object
@@ -262,8 +264,6 @@ Enter a variable that contains a certificate or a command or expression that get
262
264
To find a certificate, use `Get-PfxCertificate` or use the `Get-ChildItem` cmdlet in the Certificate (`Cert:`) drive.
263
265
If the certificate is not valid or does not have sufficient authority, the command fails.
264
266
265
-
> **Note**: This feature may not work on OS platforms where `libcurl` is configured with a TLS provider other than OpenSSL.
@@ -579,6 +583,8 @@ Indicates the cmdlet should preserve the `Authorization` header, when present, a
579
583
580
584
By default, the cmdlet strips the `Authorization` header before redirecting. Specifying this parameter disables this logic for cases where the header needs to be sent to the redirection location.
581
585
586
+
This feature was added in PowerShell 6.0.0.
587
+
582
588
```yaml
583
589
Type: SwitchParameter
584
590
Parameter Sets: (All)
@@ -721,6 +727,8 @@ Skips certificate validation checks. This includes all validations such as expir
721
727
722
728
> **Warning**: Using this parameter is not secure and is not recommended. This switch is only intended to be used against known hosts using a self-signed certificate for testing purposes. Use at your own risk.
723
729
730
+
This feature was added in PowerShell 6.0.0.
731
+
724
732
```yaml
725
733
Type: SwitchParameter
726
734
Parameter Sets: (All)
@@ -740,6 +748,8 @@ This switch should be used for sites that require header values that do not conf
740
748
741
749
This will disable validation for values passed to the **-ContentType**, **-Headers** and **-UserAgent** parameters.
742
750
751
+
This feature was added in PowerShell 6.0.0.
752
+
743
753
```yaml
744
754
Type: SwitchParameter
745
755
Parameter Sets: (All)
@@ -757,7 +767,9 @@ Sets the SSL/TLS protocols that are permissible for the web request. By default
757
767
758
768
**-SslProtocol** uses the `WebSslProtocol` Flag Enum. It is possible to supply more than one protocol using flag notation or combining multiple `WebSslProtocol` options with `-bor`, however supplying multiple protocols is not supported on all platforms.
759
769
760
-
> **Note**: This feature may not work on OS platforms where `libcurl` is configured with a TLS provider other than OpenSSL.
770
+
> **Note**: On non-Windows platforms it may not be possible to supply `'Tls, Tls12'` as an option.
771
+
772
+
This feature was added in PowerShell 6.0.0.
761
773
762
774
```yaml
763
775
Type: WebSslProtocol
@@ -801,6 +813,8 @@ The OAuth or Bearer token to include in the request. **-Token** is required by c
0 commit comments