What is the HTTP request and response

What is the HTTP request and response?

What is an HTTP request?

When you open the URL of a website in a browser, the browser sends a request to the server (where the website is located) to get the website.

This request made by you or your browser is an HTTP request. It is called an HTTP request because the request is made through the HTTP protocol.

what is HTTP Request
HTTP Request

What is an HTTP response?

When you send a request to a server, the server will send something back to you after listening your request, and this is called an HTTP response.

what is HTTP Request and Response
HTTP Request and Response

HTTP Request VS Response in a single line

The HTTP request is made by you (client) to the server. The HTTP response is made by the server to you (client).


HTTP Request and Response Example

– Example 1 –

When a request is sent to the root of server, by default the index.html will be sent as a response to the request sender.

HTTP request and response example 1

– Example 2 –

HTTP request and response example 2