Skip to content

Instantly share code, notes, and snippets.

@audstanley
Created October 3, 2020 02:50
Show Gist options
  • Save audstanley/8e58d1084c6443840ba065271c1381fd to your computer and use it in GitHub Desktop.
Save audstanley/8e58d1084c6443840ba065271c1381fd to your computer and use it in GitHub Desktop.

// install the "REST Client" extension in VSCode. @baseUrl=co.audstanley.com

GET http://{{baseUrl}}/coffeeorders HTTP/1.1

###

POST http://{{baseUrl}}/coffeeorders HTTP/1.1 content-type: application/json

{
"coffee": "Richard Stanley", "email": "[email protected]", "flavor": "Pumpkin Spice", "strength": "100"

}

###

# deletes all the orders from the collection DELETE http://{{baseUrl}}/coffeeorders HTTP/1.1

###

GET http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1

###

PUT http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1 content-type: application/json

{
"coffee": "Richard Stanley", "email": "[email protected]", "flavor": "Vanilla", "strength": "0"

}

###

# only delete audstanley's last order DELETE http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment