REST (Representational State Transfer) is an architectural style that defines a set of constraints to be used for creating web services.
- GET: Retrieves data from the server. It is a safe and idempotent operation, meaning it does not modify the resource and can be called multiple times without changing its state.
- POST: Sends data to the server to create a new resource. It is used for creating new entities on the server.
- DELETE: Deletes a resource on the server. It is used to remove an existing resource from the server.
- PUT: Sends data to the server to update or create a resource if it does not exist. It replaces the entire resource with the new data provided.
- PATCH: Applies partial modifications to a resource. It is used to update specific fields of an existing resource without replacing the entire content.