From fa070f951d0f456f895ecbc2afcdbae266c9ea3b Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Mon, 22 Aug 2016 21:18:02 -0400 Subject: [PATCH] REST --- node.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/node.md b/node.md index c33f4df..71f379f 100644 --- a/node.md +++ b/node.md @@ -235,6 +235,21 @@ Now instead of using form data, we can use Postman. Create a new tab, choose me We can capture the `req.body` params the same way as with form data. ## REST + +There are seven routes which control basic HTTP operations for data: + +https://gist.github.com/alexpchin/09939db6f81d654af06b + +| **URL** | **HTTP Verb** | **Action**| +|------------|-------------|------------| +| /photos/ | GET | index +| /photos/new | GET | new +| /photos | POST | create +| /photos/:id | GET | show +| /photos/:id/edit | GET | edit +| /photos/:id | PATCH/PUT | update +| /photos/:id | DELETE | destroy + ## Method Override ## Database ## Static