GET expresses a client’s intent to retrieve data from a server without changing server-side data. A request’s path identifies where it goes; its HTTP method identifies the requested action. section 8.2
Viewing products
A GET request to /products retrieves the product list for an HTML view. The same path can use POST to add a product: the path stays the same, while the method signals a different action. section 8.2
Table 8.2 Basic HTTP methods you’ll often encounter in web apps
|
HTTP method
|
Description
|
|
GET
|
The client’s request only retrieves data.
|
|
POST
|
The client’s request sends new data to be added by the
server.
|
|
PUT
|
The client’s request changes a data record on the server
side.
|
|
PATCH
|
The client’s request partially changes a data record on
the server side.
|
|
DELETE
|
The client’s request deletes data on the server side.
|
Compare GET with other common methods for adding, changing, or deleting data. section 8.2
















