Last active
December 20, 2015 15:49
-
-
Save gabrieljoelc/6156689 to your computer and use it in GitHub Desktop.
Parse API call with Powershell Invoke-RestMethod and equivalent curl command.
This file contains hidden or 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
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 |
This file contains hidden or 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
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