// install the "REST Client" extension in VSCode. @baseUrl=localhost:3000
###
# deletes all the orders from the collection DELETE http://{{baseUrl}}/coffeeorders HTTP/1.1
###
# get all orders GET http://{{baseUrl}}/coffeeorders HTTP/1.1
###
# add new order for triple espresso POST http://{{baseUrl}}/coffeeorders HTTP/1.1 content-type: application/json
- {
- "coffee": "triple espresso", "emailAddress": "[email protected]", "flavor": "Pumpkin Spice", "strength": "100"
}
###
# add new order for espresso POST http://{{baseUrl}}/coffeeorders HTTP/1.1 content-type: application/json
- {
- "coffee": "espresso", "emailAddress": "[email protected]", "flavor": "Mocha", "strength": "80"
}
###
# add new order for americano POST http://{{baseUrl}}/coffeeorders HTTP/1.1 content-type: application/json
- {
- "coffee": "americano", "emailAddress": "[email protected]", "flavor": "Caramel", "strength": "60"
}
###
# add new order for earl grey POST http://{{baseUrl}}/coffeeorders HTTP/1.1 content-type: application/json
- {
- "coffee": "earl grey", "emailAddress": "[email protected]", "flavor": "None", "strength": "80"
}
###
# get all orders GET http://{{baseUrl}}/coffeeorders HTTP/1.1
###
# get any order from [email protected]
GET http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1
###
# get any order from [email protected]
GET http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1
###
# get any order from [email protected] (should be none)
GET http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1
###
# update flavor for [email protected]'s order PUT http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1 content-type: application/json
- {
- "coffee": "earl grey", "emailAddress": "[email protected]", "flavor": "Vanilla", "strength": "80"
}
###
# update coffee and flavor for [email protected]'s order PUT http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1 content-type: application/json
- {
- "coffee": "double espresso", "emailAddress": "[email protected]", "flavor": "Mocha", "strength": "100"
}
###
# get all orders GET http://{{baseUrl}}/coffeeorders HTTP/1.1
###
# only delete [email protected]'s last order DELETE http://{{baseUrl}}/coffeeorders/[email protected] HTTP/1.1
###
# get all orders GET http://{{baseUrl}}/coffeeorders HTTP/1.1