HTTP (Hypertext Transfer Protocol) is an application layer protocol which is the foundation of World Wide Web used for accessing and sharing information across Internet. Internet is a collection of Networks that was built to distribute and access information. Many application protocols are used in the Internet for distributing Information out of which HTTP is the most used application across the Internet. HTTP is Client-Server model application. The Server which is called as the Web Server host the information and the Clients can get and upload/update information on the Web Server. HTTP is stateless protocol meaning it doesn’t have record and have history of clients connecting and accessing information through HTTP.
Tim Berners-Lee developed HTTP for World Wide Web (WWW) at CERN. The first version of HTTP was 0.9 and then later HTTP became public and is governed by Internet Engineering Task Force (IETF) and World Wide Web Consortium (W3C). W3C was founded by Tim Berners-Lee which comprises member organization for developing standards for HTTP. HTTP has evolved through multiple versions with improvisations. HTTP/1 (version 1.0) was published in 1996, then HTTP/1.1 (version 1.1) in 1997, then HTTP/2 (version 2.0) in 2015 and HTTP/3 (version 3.0) in 2022.
HTTP operates in request and response model between client and server. The HTTP messages have a header and body.
HTTP Request – The Client sends HTTP request to the web server. The requests has different methods depending on the action to be taken on the data. Methods are HTTP commands that are sent in HTTP request and response. The following are the various HTTP methods:
GET – Request data from the Web Server.
POST – Send data to the Web Server.
PUT – Update data of a resource in the Web Server.
DELETE – Delete data of a resource in the Web Server.
PATCH – Partially data of a resource in the Web Server.
HEAD – Request only header information data of a resource in the Web Server.
OPTIONS – Used for options between Client and Web Server.
HTTP Response – The Web Server responds back with response to the request. The following are the response codes in the HTTP header. The HTTP body will have the respective data.
| Value | Description |
| 1xx | Informational Response that Indicates the request was received, understood and in processing. |
| 2xx | Indicates that the request was received, understood and accepted. |
| 3xx | Indicates that further action must be taken in order to complete the request |
| 4xx | Indicates that the request contains bad syntax or cannot be fulfilled |
| 5xx | Indicates that the server failed to fulfill an apparently valid request |
References
RFC 2616 – Hypertext Transfer Protocol — HTTP/1.1
RFC 7231 – Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content