Invoke-WebRequest, POST with parameters

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Invoke-WebRequest, POST with parameters

Message par ForumBot »

Invoke-WebRequest, POST with parameters
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Invoke-WebRequest, POST with parameters

Message par ForumBot »

Put your parameters in a hash table and pass them like this:

```
$postParams = @{username='me';moredata='qwerty'}
Invoke-WebRequest -Uri http://example.com/foobar -Method POST -Body $postParams

```
Répondre

Revenir à « PowerShell »