<aside> 📚 📁 Category: Backend Development

</aside>

What is REST?

REST (Representational State Transfer) is an architectural style for designing networked applications. It relies on a stateless, client-server protocol, almost always HTTP.

<aside> â„šī¸ REST is not a protocol or standard, but rather a set of architectural constraints. RESTful systems are stateless, cacheable, and have a uniform interface.

</aside>

HTTP Methods

URL Design Principles

GET  /getUsers
POST /createUser
POST /deleteUser/123
GET    /users
POST   /users
DELETE /users/123
GET /user/123
GET /product/456
GET /users/123
GET /products/456
GET /users/123/orders           # Get all orders for user 123
GET /users/123/orders/456       # Get order 456 for user 123
GET /categories/5/products      # Get all products in category 5

HTTP Status Codes