Created
January 14, 2018 22:54
-
-
Save ceme/8be06f4cc898c96b387a1f6e44772b9a to your computer and use it in GitHub Desktop.
curl commands for rest api
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
GET | |
curl \ | |
--header "Accept: application/json" \ | |
https://example.com/api/users | |
POST | |
curl \ | |
--header "Content-Type:application/json" \ | |
--header "Accept: application/json" \ | |
--request POST \ | |
--data '{"name":"Brad"}' \ | |
https://example.com/api/user | |
PUT | |
curl \ | |
--header "Content-Type:application/json" \ | |
--header "Accept: application/json" \ | |
--request PUT \ | |
--data '{"name:"ryan","uid":"1"}' \ | |
https://example.com/api/user | |
PATCH | |
curl \ | |
--header "Content-Type:application/json" \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment