0 Shares
0
0
0

RESTful routes

Here is a good  cheatsheet to take for anyone who is a beginner and its trying to learn about routes and what is going on.  

 Here are some of my old notes:

Instead of relying exclusively on the URL to indicate what webpage you want to go to, it’s a combination of VERB + URL. That way, the same URL, when used with a different verb (one of GET, PUT, POST, DELETE), will get you to a different page. This makes for cleaner, shorter URLs, and is particularly adapted to CRUD applications, which most web apps are.

One big part of the whole restful thing is that you should use the different HTTP methods to represent different actions(GET, POST, PUT, DELETE).

For example in Rails if you were to send a HTTP Delete to /users/[id] it would signify that you want to delete that user. HTTP Get would retrieve an appropriate representation of the user. HTTP Put can update or create a user. and HTTP Post will be use in cases such as input in a form for example. 

0 Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
CSS Transparency – CheatSheet For Dark Transparency: background-color: rgba(25,0,0,0.5)
Read More
Cheat-sheet: Job application code challenge check-list: Analyze and write problem definition and approach (inc. pseudo code) Create a…
Read More
I found this quote from Sheryl Sandberg and it remind me to my grandpa.  When I was a…
Read More