HTTP Hyper Text Transfer Protocol

The HTTP (Hyper Text Transfer Protocol) transfers a data various formats such as JSON, XML, plain text, binary, etc.

HTTP also allows us to transfer file like FTP.

It’s an application protocol for distributed, collaborative, hypermedia information systems to make a connection in between web browser and application web server.

HTTP works like SMTP transferring data in between client and server. HTTP sends message to server immediately. But, SMTP store the message and send it in sometime.

HTTP Request Features

Connectionless → In connectionless protocol, a web browser sends a request to an application webserver and the application web server sends the response back to the browser. The connection exists between the browser and the application server until the request and response are not completed.

Media Independent → Web browser and application server need to specify the MIME-type header to handle the content.

Stateless → In stateless protocol both web browser and server make a relation at the time of connect. In this case both web browser and sever don’t preserve/store any of the information.

HTTP request

An HTTP request is the one where we send a request from a browser to an application server. This request contains multiple pieces of information as mentioned below:

request URL → This will be address URL of web server to make a connection.

HTTP request Method → It identifies the request type on server. e.g. GET, POST, DELETE.

The HTTP request header → This contains information related to cookies, session, referrer, etc.

HTTP request Body → This we use to send a data to server in predefined format. e.g. JSON, XML, plain text, binary, etc.

Http Response

An HTTP response is also same where we send a response from application server to web browser. This request contains multiple pieces of information as mentioned below:

Response Status Code → Its a code which identifies the response is a success, error, redirect, etc. 

Below are some very common response status codes:

200 OK : This denotes the work is completed successfully.

404 Not Found : address URL of web server to make a connection not found.

401 Unauthorized : Request is not authenticated to make a connection with server.

500 Internal Server Error : Something went wrong where the server was not able to handle it properly.

HTTP response header → This contains information related to cookies, sessions, etc. set up on a server.

The HTTP response Body → This we use to send a data form application server in predefined format. e.g. JSON, XML, plain text, binary, etc. to web browser.

HTTP request methods

Below are the request methods we can use to connect with application web server.

POST → It allows to send large amount of data to application web server. e.g. submission of any form. Sent data is secure as it is not part of request URL.

PUT → allows to place a file on the server. This can be done with the help of POST too.

HEAD → To see only the headers of a response, such as Content-Type, Content-Length or the resource exist depending on response status code.

DELETE → Allows to delete a document, webpage or information from the server.

OPTIONS → determines which HTTP methods server supports and returns appropriate headers.

TRACE → Returns the headers sent with the TRACE request to the client, so that they can be used in debugging.

Imran Khan

Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.

  • Languages: Java, Python
  • Frameworks: J2EE, Spring, Struts 2.0, Hibernate
  • Web Technologies: React, HTML, CSS
  • Analytics: Adobe Analytics
  • Tools & Technologies: IntelliJ, JIRA

🌐 LinkedIn

📝 Blogs

📧 Imran Khan