Difference between revisions of "REST - Wendy's 4 for 4"
(Created page with " == Overview == == Components == == Usage == == Concepts == == Restrictions == == Sources ==") |
|||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
* '''Resource Path''' | |||
Resource path is the “request target” or the desired destination for the object. For example, a resource path could be ''“codermerlin.com/wiki/database/grades”'' where the object would be sent to the grades directory of the host. | |||
* '''HTTP Verb''' | |||
With an HTTP Verb, the actions of the resource could be easily defined. A handy acronym to remember the available HTTP Verbs is “'''C R U D'''” or '''C'''reation (creates a resource), '''R'''etrieval (retrieves a resource), '''U'''pdate (updates a resource), and '''D'''eletion (deletes a resource). | |||
* '''Body''' | |||
The body is the contents of the resource, and conveniently uses the JSON (JavaScript Object Notation) as the format. Both Creation operations and Update operations contain a body, but a Retrieval operation does not contain a body. In addition, the Deletion operation would also not contain a body. | |||
* '''Header''' | |||
A header in short is simply a description of the resource, essentially acting as a metadata for the resource. | |||
== Components == | == Components == | ||
Revision as of 10:23, 20 August 2021
Overview[edit]
- Resource Path
Resource path is the “request target” or the desired destination for the object. For example, a resource path could be “codermerlin.com/wiki/database/grades” where the object would be sent to the grades directory of the host.
- HTTP Verb
With an HTTP Verb, the actions of the resource could be easily defined. A handy acronym to remember the available HTTP Verbs is “C R U D” or Creation (creates a resource), Retrieval (retrieves a resource), Update (updates a resource), and Deletion (deletes a resource).
- Body
The body is the contents of the resource, and conveniently uses the JSON (JavaScript Object Notation) as the format. Both Creation operations and Update operations contain a body, but a Retrieval operation does not contain a body. In addition, the Deletion operation would also not contain a body.
- Header
A header in short is simply a description of the resource, essentially acting as a metadata for the resource.