{"info":{"_postman_id":"7a4d74a2-e36b-4f85-a1d5-5540fa33cb57","name":"cafe","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"8370820","collectionId":"7a4d74a2-e36b-4f85-a1d5-5540fa33cb57","publishedId":"SVYtPJZM","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-08-12T06:00:33.000Z"},"item":[{"name":"/menu","id":"f5843d21-bcab-4cb3-a692-c332dadc3bc4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/menu","description":"<p>Returns a JSON collection of categories and items available on the CSE154 cafe menu.</p>\n","urlObject":{"port":"8000","path":["menu"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b416a301-bef6-4263-9dea-bd88dd63ef95","name":"/menu","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/menu"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"724"},{"key":"ETag","value":"W/\"2d4-MmRpyd3LeCTU1HB0GspDicz5mpA\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:46:34 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"categories\": {\n        \"Drinks\": [\n            {\n                \"name\": \"Bubble Tea\",\n                \"image\": \"tea.png\",\n                \"description\": \"Bubbles.\",\n                \"in-stock\": true\n            },\n            {\n                \"name\": \"Classic Coffee\",\n                \"image\": \"coffee.png\",\n                \"description\": \"The classic.\",\n                \"in-stock\": true\n            },\n            {\n                \"name\": \"The Sippy\",\n                \"image\": \"the-sippy.png\",\n                \"description\": \"The classic. In a sippy cup.\",\n                \"in-stock\": false\n            }\n        ],\n        \"Foods\": [\n            {\n                \"name\": \"Baguette\",\n                \"image\": \"baguette.jpg\",\n                \"description\": \"A Baguette.\",\n                \"in-stock\": true\n            },\n            {\n                \"name\": \"Cereal\",\n                \"image\": \"cereal.png\",\n                \"description\": \"To complement the most important drink of the day.\",\n                \"in-stock\": true\n            },\n            {\n                \"name\": \"Coffee Noodles\",\n                \"image\": \"noodles.jpg\",\n                \"description\": \"The next big thing.\",\n                \"in-stock\": true\n            },\n            {\n                \"name\": \"Doughnut\",\n                \"image\": \"doughnut.png\",\n                \"description\": \"We don't have bagels.\",\n                \"in-stock\": false\n            }\n        ]\n    }\n}"}],"_postman_id":"f5843d21-bcab-4cb3-a692-c332dadc3bc4"},{"name":"/menu/:category","id":"e373526a-515b-41ab-ab9b-524dd46b9fb4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/menu/","description":"<p>Returns JSON data with items for the given category, if valid (ignoring letter-casing). Requires that spaces in a multi-word category are replaced with \"-\". If given a category that does not exist on the server, returns a plain text 400 error message: \"Category [category] not found.\"</p>\n","urlObject":{"port":"8000","path":["menu",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"07a23041-6483-42f6-a82a-0c8891e374fa","name":"/menu/foods","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/menu/foods"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"66"},{"key":"ETag","value":"W/\"42-Ee6RvDVmyet+BRA7HD7OuQ47Yas\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:51:23 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    \"baguette\",\n    \"cereal\",\n    \"coffee-noodles\",\n    \"doughnut\"\n]"},{"id":"36f84366-d508-421f-bce4-f8cd85d83362","name":"/menu/badcategory","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/menu/badcategory"},"status":"Bad Request","code":400,"_postman_previewlanguage":"html","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"31"},{"key":"ETag","value":"W/\"1f-olEgLFY7wOyCCDy54w3MHSrs48I\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:51:57 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Category badcategory not found."},{"id":"77ebe3d6-3a58-461f-98b4-db7a5d729dfc","name":"/menu/drinks","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/menu/drinks"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-TDxgxJWfTXadsRYoVwIRWwzGuPg\""},{"key":"Date","value":"Fri, 09 Aug 2019 08:05:45 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    \"bubble-tea\",\n    \"classic-coffee\",\n    \"the-sippy\"\n]"}],"_postman_id":"e373526a-515b-41ab-ab9b-524dd46b9fb4"},{"name":"/categories","id":"29ddc146-5f46-44c9-888f-edf5dda29823","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/categories","description":"<p>Returns a JSON array of cateogries on the menu.</p>\n","urlObject":{"port":"8000","path":["categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8675f993-f67b-4af0-bfb0-7bbbc3c232c6","name":"/categories","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/categories"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"18"},{"key":"ETag","value":"W/\"12-1EmWKjO3x3d6gcK40ajxxtSgyeQ\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:50:13 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    \"drinks\",\n    \"foods\"\n]"}],"_postman_id":"29ddc146-5f46-44c9-888f-edf5dda29823"},{"name":"/images","id":"c7c17508-bf33-4076-a5a5-45ff01bb4cf2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/images","description":"<p>Returns a list of stock images available for cafe menu items.</p>\n","urlObject":{"port":"8000","path":["images"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9a6a5eac-c9be-453a-af4a-d2a6e84aa24f","name":"/images","originalRequest":{"method":"GET","header":[],"url":"localhost:8000/images"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"1462"},{"key":"ETag","value":"W/\"5b6-Gc1aU7kSG3hbU9VsZA50crV/vb4\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:48:55 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"apple.png\nasparagus.png\naubergine.png\navocado.png\nbaguette.jpg\nbanana.png\nbeans.png\nbiscuit.png\nblueberries.png\nboiled.png\nbread.jpg\nbroccoli.png\ncabbage.png\ncake.png\ncandy.png\ncarrot.png\ncauliflower.png\ncereal.png\ncereals.png\ncheese.png\nchef.png\ncherries.png\nchili.png\nchips.png\nchives.png\nchocolate.png\ncoconut.png\ncoffee-beans.png\ncoffee-maker.png\ncoffee.png\ncookies.png\ncorn.png\ncroissant.png\ncucumber.png\ncupcake-1.png\ncupcake-2.png\ncupcake.png\ndoughnut-1.png\ndoughnut-2.png\ndoughnut.png\negg.png\nfig.png\nfish.png\nfood.png\nfrappe.png\nfries.png\ngingerbread.png\ngrapes.png\nhamburger.png\nhoney.png\nhot-dog.png\nice-cream-1.png\nice-cream-10.png\nice-cream-11.png\nice-cream-12.png\nice-cream-13.png\nice-cream-14.png\nice-cream-3.png\nice-cream-4.png\nice-cream-5.png\nice-cream-6.png\nice-cream-7.png\nice-cream-8.png\nice-cream-9.png\nice-cream.png\nketchup.png\nlemon.png\nlime.png\nlollipop.png\nmeat-1.png\nmeat.png\nmilk.png\nmushroom.png\nmustard.png\nnoodles.jpg\nolives.png\norange.png\npancakes-1.png\npasta-1.png\npeach.png\npear.png\npickles.png\npie.png\npineapple.png\npizza-1.png\npizza-2.png\npizza-3.png\npizza-4.png\npizza-5.png\npizza.png\npomegranate.png\npopsicle.png\npot-1.png\npot-2.png\npretzel.png\npudding.png\nradish.png\nraspberry.png\nrice.png\nsalad.png\nsandwich.png\nsausage.png\nshrimp.png\nsippy.png\nsoda.png\nspaghetti.png\nspices.png\nsteak.png\nstrawberry.png\nsushi.png\ntaco.png\ntea-1.png\ntea.png\ntoast.png\ntoffee.png\ntomato.png\nturkey.png\nwater.png\nwatermelon.jpg\nwatermelon.png\n"}],"_postman_id":"c7c17508-bf33-4076-a5a5-45ff01bb4cf2"},{"name":"/contact","id":"1bd6486c-ec47-40d3-81c7-ee8ce6605306","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Dubs","type":"text"},{"key":"message","value":"Dubs says hello","type":"text"},{"key":"email","value":"dubs@uw.edu","type":"text"}]},"url":"localhost:8000/contact","urlObject":{"port":"8000","path":["contact"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"06f75416-7489-4ccd-85ae-8a82b470020f","name":"POST /contact Example 3: Missing Required Email","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Dubs","type":"text"},{"key":"message","value":"Dubs says hello again but forgot an email.","type":"text"}]},"url":"localhost:8000/contact"},"status":"Bad Request","code":400,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-pfPH7Oit11+XyxjDC9Vop/rDCjM\""},{"key":"Date","value":"Mon, 12 Aug 2019 07:47:42 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Required POST parameters for /contact: name, email, message."},{"id":"169da072-711b-4126-96bc-f03bb9d53502","name":"POST /contact Example 1","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Dubs","type":"text"},{"key":"message","value":"Dubs says hello","type":"text"},{"key":"email","value":"dubs@uw.edu","type":"text"}]},"url":"localhost:8000/contact"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"59"},{"key":"ETag","value":"W/\"3b-9fMkCgetaTxI5yh++mMhAzpVuUA\""},{"key":"Date","value":"Fri, 09 Aug 2019 07:59:33 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Your message was received! We will send an email back soon."},{"id":"eae8d9c0-0f55-4b78-8cfc-909dbdaedf8e","name":"POST /contact Example 2","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Dubs","type":"text"},{"key":"message","value":"Dubs says hello again","type":"text"},{"key":"email","value":"dubs@uw.edu","type":"text"}]},"url":"localhost:8000/contact"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"59"},{"key":"ETag","value":"W/\"3b-9fMkCgetaTxI5yh++mMhAzpVuUA\""},{"key":"Date","value":"Fri, 09 Aug 2019 21:00:48 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Your message was received! We will send an email back soon."}],"_postman_id":"1bd6486c-ec47-40d3-81c7-ee8ce6605306"},{"name":"/addItem","id":"09dd8c76-fc7b-4768-b634-440c08f00d7d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Banana","type":"text"},{"key":"category","value":"Fresh Fruit","type":"text"},{"key":"description","value":"A fresh test banana.","type":"text"},{"key":"image","value":"banana.png","type":"text"}]},"url":"localhost:8000/addItem","description":"<p>Proposes a new item to add to the menu. Requires name, category, and description POST parameters, and supports an optional image parameter (e.g. \"apple.png\"). If no image parameter is passed, defaults to \"food.png\".</p>\n<p>Adds the proposed item's name, description, and image to <code>&lt;category&gt;-proposals.json</code>, creating a new file if a new category.</p>\n<p>Response type: text/plain\nSends a 400 error if missing one of the 3 required params.\nSends a 500 error if something goes wrong in file-processing.\nSends a success message otherwise.</p>\n","urlObject":{"port":"8000","path":["addItem"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a856b4a1-17c5-44f7-8346-9db211d60e54","name":"POST /addItem Example 3: No Image (Optional)","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Mystery Food","type":"text"},{"key":"category","value":"other","type":"text"},{"key":"","value":"","type":"text","disabled":true},{"key":"description","value":"It's a mystery!","type":"text"}]},"url":"localhost:8000/addItem"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"79"},{"key":"ETag","value":"W/\"4f-8Ar7riNXiA98fsJ9Ybr5u9Ndz2o\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:57:06 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Request to add Mystery Food to menu successfully added to other-proposals.json!"},{"id":"cb912c99-1aae-4638-bcf3-3bc79d37cd50","name":"POST /addItem Example 2 (Espresso)","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Espresso","type":"text"},{"key":"category","value":"Drinks","type":"text"},{"key":"image","value":"coffee.png","type":"text"},{"key":"description","value":"When you really need caffeine.","type":"text"}]},"url":"localhost:8000/addItem"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"76"},{"key":"ETag","value":"W/\"4c-TgTIM8pvSsFb7Ah9/UXdXcb5gvc\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:55:29 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Request to add Espresso to menu successfully added to drinks-proposals.json!"},{"id":"df92a6a5-f884-4ce2-891f-5b0194eeaf79","name":"POST /addItem Example 1 (Banana)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Banana","type":"text"},{"key":"category","value":"Fresh Fruit","type":"text"},{"key":"description","value":"A fresh test banana.","type":"text"},{"key":"image","value":"banana.png","type":"text"}]},"url":"localhost:8000/addItem"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"65"},{"key":"ETag","value":"W/\"41-zhh8i0JFGXsOhuqFjl9jZ0BH9D0\""},{"key":"Date","value":"Mon, 12 Aug 2019 19:38:11 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Banana proposal successfully added to fresh-fruit-proposals.json!"},{"id":"e2f23b89-238b-4469-8259-a8d546a4b748","name":"POST /addItem Example 4: Missing description parameter (required).","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Mystery Food","type":"text"},{"key":"category","value":"other","type":"text"},{"key":"description","value":"It's a mystery!","type":"text","disabled":true}]},"url":"localhost:8000/addItem"},"status":"Bad Request","code":400,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"67"},{"key":"ETag","value":"W/\"43-EJJst365QqvvTufvEqZq4QWpwmU\""},{"key":"Date","value":"Mon, 12 Aug 2019 05:57:41 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Required POST parameters for /addItem: category, name, description."}],"_postman_id":"09dd8c76-fc7b-4768-b634-440c08f00d7d"}]}