Skip to content

HTTP method

An HTTP method, also called an HTTP verb, is a keyword at the start of an HTTP request that tells a server what action a client wants to perform on the resource named by a URL. Each method carries agreed-upon semantics, so a request line like GET /articles/42 names both the operation and its target.

The protocol defines a small, fixed set of methods, and a handful of them account for almost all traffic:

  • GET: Retrieves a representation of a resource without changing it.
  • POST: Submits data to a resource, often creating a new record or triggering server-side processing.
  • PUT: Replaces the target resource entirely with the supplied representation.
  • PATCH: Applies a partial update to an existing resource.
  • DELETE: Removes the target resource.
  • HEAD: Requests only the headers that a GET would return, without the body.
  • OPTIONS: Asks which methods and features the resource supports.

Two cross-cutting properties classify these methods. A method is safe when it only reads data and leaves server state unchanged, as GET, HEAD, and OPTIONS do.

A method is idempotent when sending an identical request several times has the same effect on the server as sending it once. GET, PUT, and DELETE are idempotent, whereas POST usually is not, since each call tends to create another record. These guarantees let caches, proxies, and clients retry or reuse requests without corrupting data, and the grid below sorts each method by both properties:

GET, HEAD, and OPTIONS are safe and idempotent, PUT and DELETE idempotent only, POST and PATCH neither.
Safe and Idempotent by Method

REST-style APIs map these methods onto create, read, update, and delete operations, and Python reaches them through its http and urllib packages.

Python’s Requests Library (Guide)

Tutorial

Python's Requests Library (Guide)

The Requests library is the go-to tool for making HTTP requests in Python. Learn how to use its intuitive API to send requests and interact with the web.

intermediate web-dev

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated July 22, 2026