What is HTTP?

HTTP means Hyper Text Transfer Protocol. It is used to establish communication between a Web Browser and a Web Server. While establishing communication, HTTP request is sent and HTTP response is received.


HTTP works on Client-Server Architecture.


Data is transferred over the Internet through HTTP.


World Wide Web (WWW) is about communication between Web Clients and Web Servers.


What is HTTP ?


What are Clients?

Clients are web browsers that send requests and receive responses. Apart from the browser, they can also be any type of device and program.


What are Servers?

Servers are computers and systems that provide resources, data, and services to computers connected to a network. They process the request received from the client and then send the response.

HTTP Request/Response

Communication between clients and servers is made through request and response as follows:
  • A client sends an HTTP request to the server.
  • A server receives the request.
  • A server processes that request.
  • The server provides a response to the browser after processing the request.
  • The client receives that response and displays the output on the browser.
Note: The client does not wait for a request to be completed and continues to send multiple requests and receives responses. alert-warning

A Typical HTTP Request/Response Circle:

  • The server returns the HTML file when the browser requests the HTML page.
  • The server returns the CSS file when the browser requests the stylesheet.
  • The server returns the JavaScript file when the browser requests the JavaScript code.
  • The server returns the JPG/JPEG file when the browser requests the image.


Evolution of HTTP

1991 → HTTP/0.9 : One-Line Method
1996 → HTTP/1.0 : HTTP headers, Caching Technique
1997 →  HTTP/1.1 : Pipelining, Connection Keepalive
2009 → SPDY : Developed By Google, Single Request per TCP Connection, Compression
2015 → HTTP/2.0 : Compresses Headers, Multiplexed Protocol


Different Methods of HTTP

  • Get
  • Post
  • Put
  • Patch 
  • Delete

GET Method : 

This method is used when GET data from a specified resource. GET should only retrieve data.


POST Method :

This method is used to send data to the server. 


PUT Method

This method is used to send data to the server to create/update a resource.


PATCH Method

This method is used to apply partial modifications to a resource.


DELETE Method

This method is used to delete specific resource or data on server.



Status Codes of HTTP


200 Success

301 Moved Permanently

400 Bad Request

401 Unauthorized

404 Not Found

500 Internal Server Error


Summary

Now you know what is HTTP?  We will continuously publish posts on HTTP and keep you updated. You can subscribe to our blog so that you can get all the information related to new technology and you can keep yourself updated.

Post a Comment

Previous Post Next Post