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 set of standardized methods, which can be extended through an IANA registry, 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 aGETwould 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:
REST-style APIs map these methods onto create, read, update, and delete operations, and Python reaches them through its http and urllib packages.
Related Resources
Tutorial
Python's urllib.request for HTTP Requests
In this tutorial, you'll be making HTTP requests with Python's built-in urllib.request. You'll try out examples and review common errors encountered, all while learning more about HTTP requests and Python in general.
For additional information on related topics, take a look at the following resources:
- HTTP Requests With Python's urllib.request (Course)
- How to Launch an HTTP Server in One Line of Python Code (Tutorial)
- Python and REST APIs: Interacting With Web Services (Tutorial)
- Making HTTP Requests With Python (Course)
- Python's Requests Library (Guide) (Tutorial)
- Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1 (Tutorial)
- Build and Handle POST Requests in Django – Part 3 (Tutorial)
- How to Launch an HTTP Server in One Line of Python Code (Quiz)
- Interacting With REST APIs and Python (Course)
- Python and REST APIs: Interacting With Web Services (Quiz)
- Python's Requests Library (Quiz)
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Martin Breuss • Updated Nov. 6, 2026