Hypertext Transfer Protocol for web communication
Core Idea: HTTP (Hypertext Transfer Protocol) is the foundation of data communication on the web, defining how messages are formatted and transmitted between clients and servers, and how web servers and browsers should respond to various commands.
Key Elements
-
Key principles
- Stateless protocol (each request/response is independent)
- Client-server architecture
- Request-response communication model
- Text-based protocol
- Extensible through headers
-
Request components
- Method (GET, POST, PUT, DELETE, etc.)
- URL (resource identifier)
- Headers (metadata about the request)
- Body (optional data being sent)
-
Response components
- Status code (200 OK, 404 Not Found, etc.)
- Status message
- Headers (metadata about the response)
- Body (requested resource or error information)
-
Common methods
- GET: Retrieve a resource
- POST: Submit data to be processed
- PUT: Update a resource
- DELETE: Remove a resource
- HEAD: Retrieve headers only
- OPTIONS: Get supported methods for a resource
-
Status code categories
- 1xx: Informational
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
-
Evolution
- HTTP/1.0: Basic functionality
- HTTP/1.1: Connection reuse, chunked transfers
- HTTP/2: Multiplexing, header compression
- HTTP/3: QUIC protocol, improved performance
Additional Connections
- Broader Context: Web Protocols (HTTP is one of several internet protocols)
- Applications: RESTful APIs (architectural style using HTTP methods)
- See Also: HTTPS (secure extension of HTTP using TLS/SSL)
References
- RFC 7231 - HTTP/1.1: https://tools.ietf.org/html/rfc7231
- MDN Web Docs: https://developer.mozilla.org/en-US/docs/Web/HTTP
#http #web-development #protocols
Connections:
Sources: