DEV Community

Liz P
Liz P

Posted on

What is REST

REST is a term that’s referred to a lot in programming. So, what is REST? It stands for REpresentational State Transfer. Ok, huh? REST is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other.

Still confused? Basically, it boils down to a fairly simple explanation, REST is a standardized way that web apps should structure and name their URLS. It has gained a lot of popularity in recent years due to its simplicity and scalability.

Ok, but maybe this concept's still a little hazy. Totally understandable. There are 4 basic HTTP verbs that are used to interact with resources.

www.mysite.com (example site)
www.mysite.com/results (results is my resource in this example)

1) GET- retrieves the resources and displays the result
www.mysite.com/results (all results)
www.mysite.com/results/1 (single result retrieved by ID)

2) POST- creates a new resource

3) PUT- updates a single resource by ID

4) DELETE- deletes a single resource by ID

The below image explains the HTTP methods and each CRUD action (Create, Read, Update and Destroy) well.

1-LraiNuIhwGGVb9nLmvuAIA

By using RESTful conventions it makes things clear and predictable. Thanks for reading!

Top comments (2)

Collapse
 
kasiriveni profile image
Srinivas Kasiriveni

Nice overview

Collapse
 
liz_p profile image
Liz P

Thank you!