invoke-webrequest
Verified for current stable LTS
Invoke Webrequest Command: Send Form Encoded Data Post Request
Use for send form encoded data post request with Invoke Webrequest. Exact CLI syntax to send form encoded data post request using Invoke Webrequest.
When to use this: Use for send form encoded data post request with Invoke Webrequest.
Command Syntax
Invoke-WebRequest -Method Post -Body @{ name='bob' } {http://example.com/form} Invoke-WebRequest -Method Post -Body @`{ name='bob' `} `{http://example.com/form`} Live Command Builder
Final Command
Invoke-WebRequest -Method Post -Body @{ name='bob' } {http://example.com/form} Command Breakdown
-Method- Command Option
- Tool-specific option used by this command invocation.
-Body- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to send form encoded data post request using Invoke Webrequest.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Invoke Webrequest Command: Download Url Contents To File
Invoke-WebRequest {http://example.com} -OutFile <path\to\file> Invoke Webrequest Command: Pass Username Password For Authentication Invoke-WebRequest -Headers @{ Authorization = "Basic "+ [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("myusername:mypassword")) } {http://example.com} Invoke Webrequest Command: Return Raw Html Data Invoke-WebRequest {http://example.com} -UseBasicParsing Invoke Webrequest Command: Send Json Data Content Type Header Invoke-WebRequest -Body '{{"name":"bob"}}' -ContentType 'application/json' {http://example.com/users/1234} Invoke Webrequest Command: Send Request With Extra Header Custom Method Invoke-WebRequest -Headers {{@{ X-My-Header = '123' }}} -Method <PUT> {http://example.com}