List of HTTP/1.1 Methods [2018 Update]

1. GET Method

The GET method is used to retrieve whatever is stored or produced by the resource located at the specified Request-URI. The GET method can be used to request files, to invoke server-side scripts, to interact with server-side CGI programs, and more. When HTML form variables are submitted with the form action set to GET, the form parameters are encoded in a query string and submitted to the HTTP server as part of the Request-URI using the GET request method.

Syntax:

GET <Request-URI>?query_string HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\

2. POST Method

The POST method is used to submit data to the resource located at the specified Request-URI. Typically, the resource located at the specified Request-URI is a server-side script or CGI program designed to processes form data. When HTML form variables are submitted with the form action set to POST, the form parameters are encoded and submitted to the HTTP server as the body of the POST request message.

Syntax:

POST <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n
Content-Length: <length in bytes>\r\n
Content-Type: <content type>\r\n\r\n

<query_string or other data to post to Request-URI>

3. HEAD Method

The HEAD method is identical to the GET method except that an HTTP 1.1 server should not return a message-body in the response. The meta-information contained in the HTTP headers in response to a HEAD request should be identical to the information sent in response to a GET request. This method can be used for obtaining meta-information about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.

Syntax:

HEAD <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\n

4. PUT Method

The PUT method allows for data to be transferred to an HTTP server and stored at the location identified by the Request-URI.

Syntax:

PUT <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n
Content-Length: <length in bytes>\r\n
Content-Type: <content type>\r\n\r\n

<data to put to file>

Read More: PUT method exploitation

5. OPTIONS Method

The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.

Syntax:

OPTIONS <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\n

6. DELETE Method

The DELETE method requests that the origin server delete the resource identified by the Request-URI.

Syntax:

DELETE <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\n

7. TRACE Method

The TRACE method is used to invoke a remote, application-layer loop-back of the request message…. TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing and diagnostic information.

Syntax:

TRACE <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\n

8. CONNECT Method

The CONNECT message type is used to specify a proxy connection to the resource identified by the Request-URI.

Syntax:

CONNECT <Request-URI> HTTP/1.1\r\n
Host: <hostname or IP address of host>\r\n\r\n

Read More: Test HTTP Methods for SSL Websites

You may also like:

Sarcastic Writer

Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.

Related Posts