Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

HTTP methods tell a server what kind of operation a client is requesting: retrieve information, submit data, replace a resource, make a partial change, or remove a resource’s association with its current function. Think of a waiter carrying requests between a diner and a kitchen: the method is the kind of request, while the server decides what that request means for a particular resource and whether it is allowed.

What HTTP methods do

When an app or browser communicates with a web server, it sends an HTTP request to a target, such as a web page, account, or API endpoint. The request includes a method. That method has standardized semantics: it describes the requested kind of operation, rather than prescribing exactly how every server must implement it.

The restaurant analogy helps, as long as its limits are clear. Asking to see a menu resembles retrieving information; placing an order resembles submitting data; changing an order resembles modifying a resource. In HTTP, however, the server and the target resource determine which methods are supported and what resource-specific processing occurs. A method is not a guarantee that an operation will succeed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How the five common methods differ

Method Intended operation Safe? Idempotent? What the request content means
GET Request a current representation of the target resource. Yes Yes GET content has no generally defined meaning.
POST Ask the target resource to process the content according to its own rules. No No, not generally The content is submitted for resource-specific processing; creating a resource is one common use.
PUT Request creation or replacement of the target resource’s state with the supplied representation. No Yes The representation describes the state requested for the target resource.
PATCH Request partial modification of the target resource. No Not inherently The content carries instructions for applying a change.
DELETE Request removal of the association between the target URI and its current functionality. No Yes DELETE content has no generally defined meaning.

These meanings follow RFC 9110, HTTP Semantics, and, for PATCH, RFC 5789, PATCH Method for HTTP. The server’s response depends on the resource and its implementation; the method alone does not specify every application-level outcome.

GET: retrieve, without requesting a change

GET asks for a current selected representation, often the data an app needs to display. It is safe: the client is not asking the server to change resource state. Safe does not mean that nothing happens behind the scenes. For example, a server can log a request or update operational metrics without changing the resource the client requested.

POST: submit for processing

POST asks the target resource to process the request content according to resource-specific semantics. An API might use it to create a new record, submit a form, or trigger another operation. “POST creates a resource” is a useful shorthand for one common pattern, not a complete definition.

PUT: create or replace

PUT asks for the target resource’s state to be created or replaced with the representation in the request. Its replacement semantics distinguish it from PATCH, which carries partial-change instructions. The exact representation and how the resource handles it remain dependent on the API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PATCH: apply partial modifications

PATCH carries instructions for modifying part of a resource rather than requesting replacement of its full state. The meaning of those instructions depends on the patch format and the server’s implementation. PATCH is not inherently idempotent: repeating a particular patch may apply its effect again. An API can define a patch operation whose intended effect is idempotent.

Rank #3
Sale
HTTP: The Definitive Guide
  • Used Book in Good Condition

DELETE: remove the resource’s association

DELETE requests removal of the association between a target URI and its current functionality. That is not a promise that every stored byte or underlying record has been physically erased. A server may process deletion in different ways, and a successful response can indicate acceptance for later processing, completion without a response body, or completion with a representation.

Safety and idempotence are different

Safety asks whether the client is requesting a change to resource state. Idempotence asks whether making the same request more than once has the same intended effect as making it once. A method can be unsafe but idempotent: PUT and DELETE are examples. Repeating a DELETE request does not have to produce the same response each time; the resource may already be gone. The standard is about the request’s intended effect, not identical responses or the absence of logging.

Rank #4

GET, HEAD, OPTIONS, and TRACE are defined as safe methods. GET is therefore not the only safe HTTP method, even though it is the only safe one among the five methods compared above. RFC 9110 requires general-purpose servers to support GET and HEAD; support for other methods is optional, and a resource can disallow a method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why PUT and PATCH are not interchangeable

The key distinction is replacement versus partial modification. PUT requests creation or replacement of the target resource state using the supplied representation. PATCH provides instructions for applying modifications to that state. Whether omitted fields are cleared, retained, or handled another way depends on the resource and API contract; clients should follow that API’s documentation rather than assume a universal rule.

Best Value

A patch can be risky when it assumes the resource has not changed since the client last read it. RFC 5789 describes using conditional requests, such as an If-Match header with an entity tag, to reduce the risk of applying a patch to an unexpected version. The server must support the relevant conditional behavior for this safeguard to help.

What happens when a request is repeated?

Retries are common when a connection fails and a client cannot tell whether the server processed its request. Idempotence helps reason about that uncertainty: PUT and DELETE are idempotent in intended effect, as are the safe methods. A client may still receive a different response when repeating one, and the server may record each attempt. POST is not generally idempotent, so blindly retrying it can trigger processing more than once. The right retry policy depends on the API’s documented behavior.

HTTP methods beyond these five

GET, POST, PUT, PATCH, and DELETE are common in web applications, but they are not the full set of HTTP methods. HTTP also defines HEAD, OPTIONS, TRACE, and CONNECT. Their inclusion in the standard does not mean every server or endpoint supports them. General-purpose servers must support GET and HEAD; other methods are optional, and the resource determines which are allowed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 3
HTTP: The Definitive Guide
HTTP: The Definitive Guide
Used Book in Good Condition
$26.04
SaleBestseller No. 4
HTTP Pocket Reference: Hypertext Transfer Protocol
HTTP Pocket Reference: Hypertext Transfer Protocol
Used Book in Good Condition
$6.94
SaleBestseller No. 5

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.