HTTP
HTTP (HyperText Transfer Protocol) is the application-layer protocol of the Web, built on a request-response model, stateless, and the foundation of web communication.
Purpose
It provides the application-layer protocol for distributed hypermedia systems, with flexible content negotiation and caching.
Mechanism
The client sends a request (method GET/POST/PUT/DELETE + URL + headers + body) and the server returns a response (status code + headers + body). It is stateless (cookies carry sessions). HTTP/2 adds multiplexing, HTTP/3 builds on QUIC, and HTTP/1 is a text protocol.
Use cases
- Web page and API communication
- RESTful API
- File download and upload
- WebSocket upgrades
Examples
- Input
GET /api/users HTTP/1.1Output200 OK + JSON bodyRequest-response
Common errors
- Using GET for operations with side effects
- Use POST/PUT/DELETE for state-changing operations
Related terms
HTTPS
HTTPS is HTTP over TLS: it encrypts HTTP communication at the transport layer, providing confidentiality, integrity, and server authentication, and it is the modern web standard. GLOSSARY
TLS
TLS (Transport Layer Security) provides encryption, integrity, and authentication at the transport layer; it replaced SSL and underpins HTTPS, SMTPS, and more. GLOSSARY
Cookie
A cookie is a key-value pair set by the server and stored by the browser, sent automatically with same-origin requests for session and state management. GLOSSARY
CORS
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that uses HTTP headers to control whether a page may access resources from a different origin, preventing cross-site reads. GLOSSARY
Related tools
HTTP Status Codes
Reference table of common HTTP status codes (1xx-5xx) with names, categories, and descriptions. Free, private, and 100% client-side. TOOL
URL Parser
Parse a URL into its components: protocol, host, path, query, hash, port, username, and password. Free, private, and 100% client-side. TOOL