HTTP request methods - HTTP | MDN
Summary
MDN reference table categorizing HTTP request methods by safety, idempotency, and cacheability. GET, QUERY, HEAD, and OPTIONS are safe, idempotent, and cacheable. TRACE is safe and idempotent but not cacheable. PUT and DELETE are idempotent but not safe or cacheable. POST is neither safe, idempotent, nor cacheable by default. PATCH is neither safe nor idempotent. CONNECT is none of the three. POST and PATCH can be cached only when responses carry freshness info and a matching Content-Location header. Links to the HTTP Semantics spec sections for each method, a browser compatibility table, and related pages on status codes and headers.
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 |
|---|---|---|---|
GET |
Yes | Yes | Yes |
QUERY |
Yes | Yes | Yes |
HEAD |
Yes | Yes | Yes |
OPTIONS |
Yes | Yes | No |
TRACE |
Yes | Yes | No |
PUT |
No | Yes | No |
DELETE |
No | Yes | No |
POST |
No | No | Conditional* |
PATCH |
No | No | Conditional* |
CONNECT |
No | No | No |
* POST and PATCH are cacheable when responses explicitly include freshness information and a matching Content-Location header.
Specifications
| Specification |
|---|
| HTTP Semantics # GET |
| HTTP Semantics # OPTIONS |
| HTTP Semantics # HEAD |
| HTTP Semantics # CONNECT |
| HTTP Semantics # DELETE |
| HTTP Semantics # POST |
| HTTP Semantics # PUT |
Browser compatibility
See also
Help improve MDN
Was this page helpful to you?Yes No
This page was last modified on by MDN contributors.