- GET : Retrieve data from a server.
- Read-only.
- No effect on server data.
- Can be cached.
- Can be bookmarked.
- Parameters are included in the URL.
- POST : Submit data to a server to create a new resource.
- Used for form submissions.
- ==Data included in the body of the request.==
- Not idempotent (multiple requests can create multiple resources).
- Can upload files.
- PUT : Update or create a resource on the server if it doesn’t already exist.
- Idempotent (multiple requests result in the same state).
- Replaces the entire resource.
- ==Data included in the body of the request.==
- PATCH : Apply partial modifications to a resource.
- Not necessarily idempotent.
- Updates part of the resource.
- More efficient for partial updates than PUT.
- DELETE : Remove a resource from the server.
- Idempotent (multiple requests have the same effect).
- Can delete resources.
- Rarely has a body in the request.