HTTP request methods
HTTP defines a set of request methods to indicate the purpose of the request and what is expected if the request is successful.
Although they can also be nouns, these request methods are sometimes referred to as HTTP verbs.
Each request method has its own semantics, but some characteristics are shared across multiple methods, specifically request methods can be {{glossary("Safe/HTTP", "safe")}} , {{glossary("idempotent")}} , or {{glossary("cacheable")}} .
{{HTTPMethod("GET")}}- : The
GETmethod requests a representation of the specified resource. Requests usingGETshould only retrieve data and should not contain a request{{Glossary("HTTP Content", "content")}}.
- : The
{{HTTPMethod("HEAD")}}- : The
HEADmethod asks for a response identical to aGETrequest, but without a response body.
- : The
{{HTTPMethod("POST")}}- : The
POSTmethod submits an entity to the specified resource, often causing a change in state or side effects on the server.
- : The
{{HTTPMethod("PUT")}}- : The
PUTmethod replaces all current representations of the target resource with the request{{Glossary("HTTP Content", "content")}}.
- : The
{{HTTPMethod("DELETE")}}- : The
DELETEmethod deletes the specified resource.
- : The
{{HTTPMethod("CONNECT")}}- : The
CONNECTmethod establishes a tunnel to the server identified by the target resource.
- : The
{{HTTPMethod("OPTIONS")}}- : The
OPTIONSmethod describes the communication options for the target resource.
- : The
{{HTTPMethod("TRACE")}}- : The
TRACEmethod performs a message loop-back test along the path to the target resource.
- : The
{{HTTPMethod("PATCH")}}- : The
PATCHmethod applies partial modifications to a resource.
- : The
Safe, idempotent, and cacheable request methods
The following table lists HTTP request methods and their categorization in terms of safety, cacheability, and idempotency.
| Method | Safe | Idempotent | Cacheable |
|---|---|---|---|
{{HTTPMethod("GET")}} |
Yes | Yes | Yes |
{{HTTPMethod("HEAD")}} |
Yes | Yes | Yes |
{{HTTPMethod("OPTIONS")}} |
Yes | Yes | No |
{{HTTPMethod("TRACE")}} |
Yes | Yes | No |
{{HTTPMethod("PUT")}} |
No | Yes | No |
{{HTTPMethod("DELETE")}} |
No | Yes | No |
{{HTTPMethod("POST")}} |
No | No | Conditional* |
{{HTTPMethod("PATCH")}} |
No | No | Conditional* |
{{HTTPMethod("CONNECT")}} |
No | No | No |
* POST and PATCH are cacheable when responses explicitly include freshness information and a matching {{HTTPHeader("Content-Location")}} header.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}