What is the HTTP protocol?
HTTP is primarily a protocol used by web browsers, which both the browser and the web server hosting the webpage must respect. The HTTP protocol determines how communication between these two should occur, so that both parties can interpret each other's needs correctly.
When the browser visits a website, the browser sends an HTTP request to the web server according to the client-server model. After receiving the request, the web server sends an HTTP response to the browser, which typically contains the requested page.
HTTP Request Structure
The HTTP request sent by the browser consists primarily of the HTTP method, resource path, HTTP protocol version, and HTTP headers.
Depending on the HTTP request method, the query can also include the HTTP body. This is used when data needs to be transferred from the browser to the application. For example, when a user logs into an application, the HTTP request made by the browser will typically use the POST method and the login information will be transferred in the HTTP body.
HTTP Response Structure
In an HTTP response, the web page/server returns the HTTP protocol version, status code, HTTP headers, and the requested resource.
The HTTP response returned by the server may contain, for example, HTML code that the browser renders as a visual format, but this is not required. The information contained in the HTTP response is entirely up to the application developer.
The above application returns the "Hakatemia" header. Figure it out and return it in the response. Example return: hash-x: abc
Ready to become an ethical hacker?
Start today.
As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.