What is REST?
REST (Representational State Transfer) is an architectural style for design patterns that use HTTP. It models data as resources identified by unique paths (URIs).
Using HTTP Verbs Safely
REST maps actions to native HTTP methods:
- GET `/users`: Read the list of users (must be safe and cacheable).
- POST `/users`: Create a user.
- PUT `/users/1`: Replace user 1.
- DELETE `/users/1`: Remove user 1.
Stateless Resource Representation
REST endpoints do not track session state. Every request must contain all the keys, tokens, and data required to execute the action, which simplifies scaling across servers.
