I\'m attempting to POST to a uri, and send the parameter username=me
Invoke-WebRequest -Uri http://example.com/foobar -Method POST
Single command without ps variables when using JSON as body {lastName:"doe"} for POST api call:
Invoke-WebRequest -Headers @{"Authorization" = "Bearer N-1234ulmMGhsDsCAEAzmo1tChSsq323sIkk4Zq9"} `
-Method POST `
-Body (@{"lastName"="doe";}|ConvertTo-Json) `
-Uri https://api.dummy.com/getUsers `
-ContentType application/json