Skip to content

Instantly share code, notes, and snippets.

@gabrieljoelc
Last active December 20, 2015 15:49
Show Gist options
  • Save gabrieljoelc/6156689 to your computer and use it in GitHub Desktop.
Save gabrieljoelc/6156689 to your computer and use it in GitHub Desktop.
Parse API call with Powershell Invoke-RestMethod and equivalent curl command.
curl -X POST \
-H "X-Parse-Application-Id: sensitive" \
-H "X-Parse-REST-API-Key: sensitive" \
-H "Content-Type: application/json" \
-d '{"name":"value"}' \
https://api.parse.com/restmethodspec
Invoke-RestMethod -Uri https://api.parse.com/restmethodspec `
#-Body (@{} | ConvertTo-Json) ` #empty object
-Body (@{"name"="value"} | ConvertTo-Json) `
-ContentType "application/json" `
-Headers @{ `
"X-Parse-Application-Id"="senstitive"; `
"X-Parse-REST-API-Key"="senstitive" } `
-Method Post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment