HTTP Requests
HTTP requests specify a verb (such as GET or POST), a target URL, and optionally include data. The URL is composed of a protocol (such as https), a domain (such as mycompany.com), and a path (such as /dog/whippet).
Most HTTP endpoints perform CRUD operations, and the verb used in the request serves as an indication of this. Think of data on the server as resources and of each HTTP verb as an action performed on a resource. For example, each description of a dog in a database is a resource.
The following table describes the typical usage of HTTP verbs:
Verb | Action |
|---|---|
POST | Create a resource. |
GET | Read/retrieve a resource. |
PUT | Replace a resource (update all of its properties). |
PATCH | Update a resource (only a subset of its properties). |
DELETE | Delete ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access