G
ETR
EA
DUsed to retrieve resource details from the
system.Example: Get a list of all the rooms or all the
details of one roomP
U
TU
P
D
AT
ETypically used to replace or update a resource.
Can be used to modify or create a resource.Example: Update details of a roomPA
TC
HU
P
D
AT
EUsed to modify some details about a resource.Example: Change the dimensions of a roomD
EL
ET
ED
EL
ET
EUsed 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: