Hypertext Transfer Protocol HTTP
The World Wide Web’s (WWW) primary communication protocol is the Hypertext Transfer Protocol (HTTP). Designed for distributed, collaborative, hypermedia information systems, it is an application layer protocol that is part of the Internet protocol suite concept.
HTTP specifies the format and transmission of messages between web servers and web clients, usually web browsers. Enabling the retrieval of resources such as HTML texts, photos, videos, and application data is its main objective.

You can also read Telnet Cisco Management, Configuration and Network Security
HTTP Protocol Characteristics
- Layer and Transport: In the TCP/IP model, HTTP functions at the Application layer. To guarantee dependable data delivery, it depends on the Transmission Control Protocol (TCP) at the Transport layer.
- Port Number: The popular TCP port 80 is used by HTTP. TCP destination port 80 is used for communications going to the web server, whereas TCP source port 80 is usually used for messages coming from the server.
- Data handling: HTTP specifies how a web browser retrieves a page’s contents from a web server. Multiple messages are sent in order to transfer data; in order to conserve space, succeeding messages that include portions of the file may skip the HTTP header.
Foundational Model
HTTP is a request-response protocol that functions according to a client-server architecture.
- Client (User Agent): By creating and submitting an HTTP request to the server, the client, such as a web browser or mobile application, begins the conversation.
- Server: After receiving the request and making an effort to fulfil it, the server creates an HTTP response message and forwards it to the client. The requested resource, such as an HTML document or other content, is frequently included in the answer.
Statelessness and Sessions
Because HTTP is stateless by nature, the server does not store any data or “memory” about prior requests or sessions in between two consecutive transactions. When a web application needs a session (state), HTTP cookies are usually used to accomplish this capability.
Data Exchange and Message Structure
Data exchange occurs through a sequence of request–response messages. The location of a resource is identified by a Uniform Resource Identifier (URI), commonly known as a URL, which typically uses the http or https schemes.
In HTTP 1.1 and before, a message is made up of an optional body (the actual data) and a header (metadata).
HTTP Requests
A Start Line, Headers, and an optional Body make up the structure of an HTTP request.
- Request Line: The HTTP Protocol Version, Request URI, and HTTP Method (the intended action) are all contained in the first line.
- Header Fields: These convey additional information about the client or the request, functioning as metadata. Examples include
HostandUser-Agent.
- Body: Contains the data being sent to the server, primarily used with methods like
POSTorPUT.
You can also read What is Rogue AP Detection Meaning, Configuration and Tools
HTTP Response
A Status Line, Headers, and an optional Body make up the structure of an HTTP response.
- Status Line: The HTTP Protocol Version, a Status Code, and a Reason Phrase are all included in the first line.
- Status Code: A three-digit integer that represents the status of the server’s attempt to fulfil the request is called the status code. There are five classes of codes:
- 1XX: Informational (e.g., 100 Continue).
- 2XX: Successful (e.g., 200 OK).
- 3XX: Redirection (further action needed).
- 4XX: Client Error (e.g., 404 Not Found).
- 5XX: Server Error (e.g., 500 Internal Server Error).
- Body: Contains the requested resource, such as HTML, images, or JSON data.
HTTP Request Methods (Verbs)
Methods classify the action to be performed on a resource. Important methods include:
| Method | Purpose | Characteristics |
|---|---|---|
| GET | Requests a representation of a resource (retrieves data). | Safe (read-only, no intended effect on server state) and Idempotent. |
| HEAD | Requests resource metadata only, without the body. | Safe and Idempotent. |
| POST | Submits data to be processed, often used for creating a resource. | Not necessarily Safe or Idempotent. |
| PUT | Creates or updates a resource with the state provided in the request body. | Not Safe, but Idempotent (repeated requests have the same effect as one). |
| DELETE | Requests to delete a specified resource. | Not Safe, but Idempotent. |
| PATCH | Requests to modify a resource according to its partial state, saving bandwidth compared to PUT. | Not Safe or Idempotent. |
HTTP in Web Addressing and Security
URIs/URLs: The full web address typically starts with http or https. The formal term for a web address is a Uniform Resource Identifier (URI). A URI used to connect to a web server includes the protocol (HTTP), the server’s name (hostname), and the web page (path).
Security (HTTPS): The secure variant of HTTP, Hypertext Transfer Protocol Secure (HTTPS), is mostly utilized for secure communication and e-commerce. For encryption and authentication, HTTPS uses SSL/TLS (Secure Sockets Layer/Transport Layer Security). TCP port 443 is usually used by HTTPS.
Management: The World Wide Web application can be leveraged to manage routers or switches by enabling a web server function on the network device itself. For security, it is often recommended to disable the non-encrypted HTTP server on Cisco devices using the global configuration command no ip http server.
You can also read Compare Cisco Wireless Architectures And AP Modes In Network
HTTP in RESTful APIs
Representational State Transfer (REST) APIs make considerable use of HTTP, which serves as a foundation for data transmission between applications across a network.
- REST Principles: Because HTTP’s logic inherently supports the necessary elements of REST, such as a client/server architecture and a stateless operating model (no client data is retained on the server in between requests), it is appropriate for REST.
- CRUD Actions: The four main software actions known as CRUD (Create, Read, Update, Delete) are directly mapped to HTTP verbs (methods) in RESTful architecture:
- READ maps to the HTTP GET verb.
- CREATE maps primarily to the HTTP POST verb.
- UPDATE maps to the HTTP PATCH and PUT verbs.
- DELETE maps to the HTTP DELETE verb.
- API Usage: Instead of requesting a web page, REST sends an HTTP GET request to a specified URI that identifies a resource (a data structure). The response data is returned by the server (usually in formats like JSON). The HTTP header contains the resultant status code, such as 200 or 201.
Evolution of HTTP
Development of HTTP began with Tim Berners-Lee at CERN in 1989. The protocol has undergone several major revisions to improve efficiency and capability:
| Version | Introduced | Transport Protocol | Key Features and Improvements |
|---|---|---|---|
| HTTP/0.9 | 1991 | TCP | Supported only the GET method; the connection was closed after every response. |
| HTTP/1.0 | 1996 | TCP | Introduced headers and support for different file formats; still often required a new TCP connection for each resource request. |
| HTTP/1.1 | 1997 | TCP | Introduced persistent connections (keeping the TCP connection open for multiple requests) and HTTP pipelining (which proved difficult to implement), significantly reducing latency. |
| HTTP/2 | 2015 | TCP (usually TLS-encrypted) | Used a compressed binary representation of metadata (header compression) and multiplexing (concurrent requests/responses over a single TCP connection/stream). |
| HTTP/3 | 2022 | QUIC (over UDP) | Uses QUIC instead of TCP to avoid head-of-line blocking issues in the underlying transport, leading to improved speed and reliability, especially over unreliable networks. |
HTTP is often likened to a post office system for the internet: The client writes a letter (the HTTP Request) specifying the resource they need and how they want it handled (the Method and Headers), and addresses it to a specific server. The server then processes the request and sends back a reply (the HTTP Response), which includes a brief summary of the outcome (the Status Code) and the requested content (the Body).
You can also read What Is Link Aggregation Group LAG? And Cisco EtherChannel
