DEV Community

Hamza
Hamza

Posted on

WHAT IS HTTP ?!

HTTP (HyperText Transfer Protocol) it is a way that the server communicates with the client (usually web browser) , it's fundamental protocol of the internet , and the foundation of data communication for the World Wide Web.

HTTP

HTTP provides a standard between a web browser and a web server to establish communication. it is a set of rules for transferring data from on computer to another, Data are such as text, Images and other multimedia files are shared through the WWW(World Wide Web).

EVOLUTION OF THE HTTP:

  1. Tim berners-Lee and his team at CERN are indeed credited with inventing the original of HTTP protocol.

  2. HTTP version 0.9 was the initial version introduced in 1991

  3. HTTP version 1.0 followed in 1996 with the introduction of RFC 1945

  4. HTTP version 1.1 was introduced in 1997 With RFC 2068

  5. HTTP version 2.0 was specified in RFC 7540 and published on 2015

  6. HTTP version 3.0 also known as HTTP/3, is based on the QUIC protocol and it's designed to improve web performance, it is developed by GOOGLE.

HTTP's METHODS :

  1. GET => retrieve data from the request

  2. POST => submit data to be processed

  3. PUT => update or create resources on the server

  4. PATCH => similar to PUT but this update specific data than entire resource

  5. DELETE => remove resource from the server

  6. HEAD => similar to GET but it retrieves only the headers

  7. OPTIONS => retrieve the communication options available for a resource

  8. TRACE => used for debugging purposes, it's rarely used due it security concerns

  9. CONNECT => used to establish a tunnel to the server through an HTTP proxy,

/------------------------------------------------------------------------\

HTTP Request/Response :

HTTP is a request-response protocol, which means the for every request send by the client (typically a web browser) The server responds with a corresponding response. The basix flow of an HTTP request-reponse cycle is as follows :

  1. Client send an HTTP request
  2. Server proccess the request
  3. Server sends an HTTP response
  4. Client proccess the response

HTTP request response

HTTP Status Code :

3-digit codes indicating the outcome of an HTTP request , categorized into 1xx(Informational), 2xx (Success) 3xx(Redirection) 4xx(Client Error) 5xx(Server Error) blocks.

CONCLUSION

Features :

  1. Stateless : Each request is independent, and the server doesn't retain previous interactions’ info.
  2. Text-Based : Messages are in plain text, making them readable and debuggable
  3. Client-Server Model : Follows a client-server architecture for requesting and serving resources.
  4. Request-Response : Operates on a request-response cycle between clients and servers.
  5. Request MEthods : Supports various methods like GET, POST, PUT, DELETE for different actions on resources.

Advantages :

  1. Platform Independence : Works on any operating system
  2. Compatibilty : Compatible with various protocols and technologies
  3. Efficiency : Optimized for performance
  4. Security : Supports encryption for secure data transfer

Disadvantages :

  1. Lack of security : Vulnerable to attacks like man in the middle
  2. Preformance Issues : Can be slow for large data transfers
  3. Statelessness : Requires additional mechanisms for maintaining state

Hope you guys enjoyed reading this article, See you in the next articleđź‘‹.

Top comments (0)