Created
April 3, 2023 04:11
-
-
Save jd-boyd/a09a91b16185fc055a385ee705c93105 to your computer and use it in GitHub Desktop.
PowerShell POST form, POST JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$params = @{"@type"="login"; | |
"username"="xxx@gmail.com"; | |
"password"="yyy"; | |
} | |
Invoke-WebRequest -Uri http://foobar.com/endpoint -Method POST -Body $params | |
Invoke-WebRequest -Uri http://foobar.com/endpoint -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment