Introduction

The HTTP method of an HTTP request tells the server which action the client wants it to perform and as such, a single request is only allowed to have a single method. The method is of an HTTP request is specified by an action verb, which is the first thing in the request line of the header.

There are 7 methods specified by the HTTP standard, but they may also be extended via the implementation of custom ones. Some of these methods require a request body, while others do not.

MethodDescriptionHas Request Body?
GETRetrieve a resource from the server.No
HEADRetrieve only the headers for a resource from the server.No
POSTSend data to the server for processing.Yes
PUTUpload the request body to the server.Yes
TRACETrace the messages.No
OPTIONSRetrieve from the server what HTTP methods can be used on it.No.
DELETERemove a document from the server.No.

NOTE

Due to security reasons, HTTP servers rarely implement all of the above methods and even if they do, there are usually heavy restrictions on who is allowed to use them and how.