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 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.
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.
– Example 2 –