Http Methods
Characteristics of each Http method
GETRequests to retrieve a specific resource
GET requests should only be used when fetching data
POSTSends data to the server
The type of the Request Body is indicated by the
Content-TypeheaderThe difference between PUT and POST is idempotency;
PUThasidempotencyPUT produces the same effect whether sent once or multiple times (no side effects)
Sends data to the server through the Message body
Primarily used when
creatingnew resources
PUTUses the request payload to
create a new resourceorreplace the datarepresenting the target resourceHas
idempotency
PATCHUsed when
partially modifyinga resourceNot idempotent
PATCH or POST may cause side-effects on other resources
DELETEDeletes the specified resource
HEADRequests the Header that would be returned if a specific resource were requested with a GET method
Responses to a HEAD method must not have a Body, and even if a Body exists, it must be ignored
Used for health checks of web services or to obtain web server information
OPTIONSUsed to set communication options with the target resource
TRACEUsed for
loopbacktesting
CONNECTA method that initiates
bidirectional communicationwith the requested resourceCan be used to open a tunnel
ex) Can be used to access a web site using SSL (HTTPS)
The Client requests the HTTP proxy server to establish a TCP connection with the desired destination
The server then proceeds to create the connection on behalf of the client
Once the connection is established by the server, the proxy server continues to proxy the TCP stream going to and from the client
Last updated