This content was extracted from HTB Academy
Request Methods
The following are some of the commonly used methods:
Method | Description |
---|---|
GET | Requests a specific resource. Additional data can be passed to the server via query strings in the URL (e.g.ย ?param=value ). |
POST | Sends data to the server. It can handle multiple types of input, such as text, PDFs, and other forms of binary data. This data is appended in the request body present after the headers. The POST method is commonly used when sending information (e.g. forms/logins) or uploading data to a website, such as images or documents. |
HEAD | Requests the headers that would be returned if a GET request was made to the server. It doesnโt return the request body and is usually made to check the response length before downloading resources. |
PUT | Creates new resources on the server. Allowing this method without proper controls can lead to uploading malicious resources. |
DELETE | Deletes an existing resource on the webserver. If not properly secured, can lead to Denial of Service (DoS) by deleting critical files on the web server. |
OPTIONS | Returns information about the server, such as the methods accepted by it. |
PATCH | Applies partial modifications to the resource at the specified location. |
The list only highlights a few of the most commonly used HTTP methods. The availability of a particular method depends on the server as well as the application configuration. For a full list of HTTP methods, you can visit thisย link.
Note
Most modern web applications mainly rely on theย
GET
ย andยPOST
ย methods. However, any web application that utilizes REST APIs also rely onยPUT
ย andยDELETE
, which are used to update and delete data on the API endpoint, respectively.