G
ET
R
EA
D
Used to retrieve resource details from the
system.
Example: Get a list of all the rooms or all the
details of one room
P
U
T
U
P
D
AT
E
Typically used to replace or update a resource.
Can be used to modify or create a resource.
Example: Update details of a room
PA
TC
H
U
P
D
AT
E
Used to modify some details about a resource.
Example: Change the dimensions of a room
D
EL
ET
E
D
EL
ET
E
Used to remove a resource from the system.
Example: Delete a room from a house.
Deep Dive into GET and POST
GET is the most common HTTP request method. A client
can use the GET request method to request (or “get”) a
resource from an HTTP server. GET requests, which
have special qualities, fetch information, and that’s it;
they have no side effects, make no modifications to the
system, create nothing, and destroy nothing. GET
requests should, in other words, be safe and idempotent.
(Idempotent means that no matter how many times you
perform an action, the state of the system you’re dealing
with remains the same.)
A GET request message has the following components, as
shown in Figure 7-8: