Skip to content

Commit 14f7fa2

Browse files
TravisEz13sdwheeler
authored andcommitted
Add note about javascript might run (MicrosoftDocs#4297)
* Add note about javascript might run Address MicrosoftDocs#4296 * update comment based on PR feedback
1 parent e1d19ea commit 14f7fa2

File tree

8 files changed

+44
-2
lines changed

8 files changed

+44
-2
lines changed

reference/3.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de
3434

3535
This cmdlet is introduced in Windows PowerShell 3.0.
3636

37+
> [!NOTE]
38+
> By default,
39+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
40+
> Use the `-UseBasicParsing` switch to suppress this.
41+
3742
## Examples
3843

3944
### Example 1: Get the PowerShell RSS feed

reference/3.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ It parses the response and returns collections of forms, links, images, and othe
3131

3232
This cmdlet was introduced in Windows PowerShell 3.0.
3333

34+
> [!NOTE]
35+
> By default,
36+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
37+
> Use the `-UseBasicParsing` switch to suppress this.
38+
39+
3440
## EXAMPLES
3541

3642
### Example 1

reference/4.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de
3333

3434
This cmdlet is introduced in Windows PowerShell 3.0.
3535

36+
> [!NOTE]
37+
> By default,
38+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
39+
> Use the `-UseBasicParsing` switch to suppress this.
40+
3641
## Examples
3742

3843
### Example 1: Get the PowerShell RSS feed

reference/4.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ It parses the response and returns collections of forms, links, images, and othe
3030

3131
This cmdlet was introduced in Windows PowerShell 3.0.
3232

33+
> [!NOTE]
34+
> By default,
35+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
36+
> Use the `-UseBasicParsing` switch to suppress this.
37+
3338
## EXAMPLES
3439

3540
### Example 1

reference/5.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de
3434

3535
This cmdlet is introduced in Windows PowerShell 3.0.
3636

37+
> [!NOTE]
38+
> By default,
39+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
40+
> Use the `-UseBasicParsing` switch to suppress this.
41+
3742
## Examples
3843

3944
### Example 1: Get the PowerShell RSS feed
@@ -104,11 +109,11 @@ Invoke-RestMethod -Method Post -Uri $url -Credential $Cred -Body $body -OutFile
104109
### Example 3: Pass multiple headers
105110

106111
```powershell
107-
$headers = @{
112+
$headers = @{
108113
'userId' = 'UserIDValue'
109114
'token' = 'TokenValue'
110115
}
111-
Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $body
116+
Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $body
112117
```
113118
APIs often require passed headers for authentication, validation etc.
114119

reference/5.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ It parses the response and returns collections of forms, links, images, and othe
3030

3131
This cmdlet was introduced in Windows PowerShell 3.0.
3232

33+
> [!NOTE]
34+
> By default,
35+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
36+
> Use the `-UseBasicParsing` switch to suppress this.
37+
3338
## EXAMPLES
3439

3540
### Example 1: Send a web request

reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ For JavaScript Object Notation (JSON) or XML, Windows PowerShell converts (or de
3535

3636
This cmdlet is introduced in Windows PowerShell 3.0.
3737

38+
> [!NOTE]
39+
> By default,
40+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
41+
> Use the `-UseBasicParsing` switch to suppress this.
42+
3843
## EXAMPLES
3944

4045
### Example 1: Get the PowerShell RSS feed

reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSessio
2626
```
2727

2828
## DESCRIPTION
29+
2930
The **Invoke-WebRequest** cmdlet sends HTTP, HTTPS, FTP, and FILE requests to a web page or web service.
3031
It parses the response and returns collections of forms, links, images, and other significant HTML elements.
3132

3233
This cmdlet was introduced in Windows PowerShell 3.0.
3334

35+
> [!NOTE]
36+
> By default,
37+
> script code in the web page may be run when the page is being parsed to populate the `ParsedHtml` property.
38+
> Use the `-UseBasicParsing` switch to suppress this.
39+
3440
## EXAMPLES
3541

3642
### Example 1: Send a web request

0 commit comments

Comments
 (0)