HTTP methods indicate the desired action to be performed on the identified resource.
Method | Idempotent | Safe | Body |
---|---|---|---|
GET | yes | yes | no |
SEARCH (proposed) | yes | yes | yes |
POST | no | no | yes |
PUT | yes | no | yes |
PATCH | no | no | yes |
DELETE | yes | no | no |
- Idempotent - request has no additional effect, if it is called more than once
- Safe - request doesn't change server state
- Body - request can contain body, that can affect response
Safe methods can be cached by intermediates.
- OPTIONS requests available HTTP methods on the requested resource
- HEAD requests resource headers (= GET without response body)
- TRACE requests to echo the received request
If a method is unknown to an intermediate, it will be treated as an unsafe and non-idempotent method.