HTTP Methods Flashcards
HEAD
required
is a safe method that requests a response from the server similar to a Get request except that the message body is not included.
It is a great way to acquire more information about the server and its operational status.
GET
required
Get is the most common method used. It requests information and content from the server.
For example, GET http://10.1.1.1/Webserver/index.html requests the index.html page from the server based on our supplied URI.
POST
optional
Post is a way to submit information to a server based on the fields in the request. For example, submitting a message to a Facebook post or website forum is a POST action.
The actual action taken can vary based on the server, and we should pay attention to the response codes sent back to validate the action.
PUT
optional Put will take the data appended to the message and place it under the requested URI. If an item does not exist there already, it will create one with the supplied data. If an object already exists, the new PUT will be considered the most up-to-date, and the object will be modified to match. The easiest way to visualize the differences between PUT and POST is to think of it like this; PUT will create or update an object at the URI supplied, while POST will create child entities at the provided URI. The action taken can be compared with the difference between creating a new file vs. writing comments about that file on the same page.
DELETE
TRACE
OPTIONS
CONNECT