
- HTTP - Home
- HTTP - Overview
- HTTP - Parameters
- HTTP - Messages
- HTTP - Requests
- HTTP - Responses
- HTTP - Methods
- HTTP - Status Codes
- HTTP - Header Fields
- HTTP - Caching
- HTTP - URL Encoding
- HTTP - Security
- HTTP - Message Examples
- HTTP - Versions
- HTTP - Connection Management
- HTTP - Content Negotiation
- HTTP - Redirection
- HTTP - Authentication and Authorization
- HTTP - HTTP over TLS(HTTPS)
- HTTP - HTTP/2 and HTTP/3 Features
- HTTP - API Design Considerations
- HTTP - Troubleshooting
HTTP - Overview
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. This is the foundation for data communication for the World Wide Web (i.e. internet) since 1990. HTTP is a generic and stateless protocol which can be used for other purposes as well using extensions of its request methods, error codes, and headers.
What is HTTP?
Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web. The default port is TCP 80, but other ports can be used as well. It provides a standardized way for computers to communicate with each other. HTTP specification specifies how clients' request data will be constructed and sent to the server, and how the servers respond to these requests.
Basic Features of HTTP
The basic features that make HTTP a simple but powerful protocol are mentioned below:
- Stateless: Each request is treated as a new request i.e both client and server forget about each other after completion of a request unless cookies, tokens or sessions are used.
- Connectionless: The connection between client and server is closed after the completion of each request making it a connectionless protocol.
- Media Independent: Any type of data can be transferred over web using HTTP protocol, as long as both the client and server specify the format using MIME types.
- HTTP Methods: HTTP defines various methods for different actions such as GET, POST, PUT and more.
- Caching Support: HTTP provides support for caching which improves the performance by storing the copies of responses and reusing them later.
HTTP/1.0 uses a new connection for each request/response exchange, where as HTTP/1.1 connection may be used for one or more request/response exchanges.
Basic Architecture of HTTP
The following diagram shows a very basic architecture of a web application and depicts where HTTP sits:

The HTTP protocol is a request/response protocol based on the client/server based architecture where web browsers, robots and search engines, etc. act like HTTP clients, and the Web server acts as a server.
Client
The HTTP client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a TCP/IP connection.
Server
The HTTP server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.