Skip to content

Instantly share code, notes, and snippets.

@akrueger
Last active August 12, 2016 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akrueger/a32b0760c2f9d9915a06049dc447cfc3 to your computer and use it in GitHub Desktop.
Save akrueger/a32b0760c2f9d9915a06049dc447cfc3 to your computer and use it in GitHub Desktop.
REST

REST

Representational State Transfer

  • Statelessness is defined from the perspective of the server.

  • The constraint says that the server should not remember the state of the application.

  • As a consequence, the client should send all information necessary for execution along with each request, because the server cannot reuse information from previous requests as it didn’t memorize them.

METHOD SCOPE SEMANTICS
GET collection Retrieve all resources in a collection
GET resource Retrieve a single resource
HEAD collection Retrieve all resources in a collection (header only)
HEAD resource Retrieve a single resource (header only)
POST collection Create a new resource in a collection
PUT resource Update a resource
PATCH resource Update a resource
DELETE resource Delete a resource
OPTIONS any Return available HTTP methods and other options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment