Revision 1143267 of HTTP request methods

  • Revision slug: Web/HTTP/Methods
  • Revision title: HTTP request methods
  • Revision id: 1143267
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these requests methods are sometimes referred as HTTP verbs. Each of them implements a different semantic, but some common features are shared by a group of them: e.g. a request method can be {{glossary("safe")}}, {{glossary("idempotent")}}, or {{glossary("cacheable")}}.

GET
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
HEAD
The HEAD method asks for a response identical to that of a GET request, but without the response body.
POST
The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server
PUT

The PUT method replaces all current representations of the target resource with the request payload.

DELETE
The DELETE method deletes the specified resource.
CONNECT

The CONNECT method establishes a tunnel to the server identified by the target resource.

OPTIONS
The OPTIONS method is used to describe the communication options for the target resource.
TRACE

The TRACE method performs a message loop-back test along the path to the target resource.

PATCH
The PATCH method is used to apply partial modifications to a resource.

Specifications

Specification Title Comment
{{RFC("7231", "Request methods", "4")}} Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content Specifies GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE.
{{RFC("5789", "Patch method", "2")}} PATCH Method for HTTP Specifies PATCH.

Browser compatibility

{{Compat("http/methods"}}

See also

Revision Source

<div>{{HTTPSidebar}}</div>

<p>HTTP defines a set of <strong>request methods</strong> to indicate the desired action to be performed for a given resource. Although they can also be nouns, these requests methods are sometimes referred as <em>HTTP verbs</em>. Each of them implements a different semantic, but some common features are shared by a group of them: e.g. a request method can be {{glossary("safe")}}, {{glossary("idempotent")}}, or {{glossary("cacheable")}}.</p>

<dl>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/GET">GET</a></code></dt>
 <dd>The <code>GET</code> method requests a representation of the specified resource. Requests using <code>GET</code> should only retrieve data.</dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/HEAD">HEAD</a></code></dt>
 <dd>The <code>HEAD</code> method asks for a response identical to that of a <code>GET</code> request, but without the response body.</dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/POST">POST</a></code></dt>
 <dd>The <code>POST</code> method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server</dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/PUT">PUT</a></code></dt>
 <dd>
 <p>The <code>PUT</code> method replaces all current representations of the target resource with the request payload.</p>
 </dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/DELETE">DELETE</a></code></dt>
 <dd>The <code>DELETE</code> method deletes the specified resource.</dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/CONNECT">CONNECT</a></code></dt>
 <dd>
 <p>The <code>CONNECT</code> method establishes a tunnel to the server identified by the target resource.</p>
 </dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/OPTIONS">OPTIONS</a></code></dt>
 <dd>The <code>OPTIONS</code> method is used to describe the communication options for the target resource.</dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/TRACE">TRACE</a></code></dt>
 <dd>
 <p>The <code>TRACE</code> method performs a message loop-back test along the path to the target resource.</p>
 </dd>
 <dt><code><a href="/en-US/docs/Web/HTTP/Methods/PATCH">PATCH</a></code></dt>
 <dd>The <code>PATCH</code> method is used to apply partial modifications to a resource.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{RFC("7231", "Request methods", "4")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
   <td>Specifies GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE.</td>
  </tr>
  <tr>
   <td>{{RFC("5789", "Patch method", "2")}}</td>
   <td>PATCH Method for HTTP</td>
   <td>Specifies PATCH.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">To contribute to this compatibility data, please write a pull request against this file: <a href="https://github.com/mdn/browser-compat-data/blob/master/http/methods.json">https://github.com/mdn/browser-compat-data/blob/master/http/methods.json</a>.</p>

<p>{{Compat("http/methods"}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Web/HTTP/Headers">HTTP headers</a></li>
</ul>
Revert to this revision