moves / git http / rest basics

REST basics

Nouns in the path, verbs in the method. GET must be safe and cacheable, PUT/DELETE idempotent, POST neither.

#rest#api#http#design
text

GET    /articles          list
GET    /articles/:id      read one
POST   /articles          create        -> 201 + Location
PUT    /articles/:id      full replace  (idempotent)
PATCH  /articles/:id      partial update
DELETE /articles/:id      remove        -> 204

Paginate:  /articles?page=2&limit=20
Filter:    /articles?tag=css&sort=-createdAt

Related

WWADD — Choose the tool. Make the move. Build the stack.

FREE REFERENCE · NO LOGINCONTACTPRIVACYTERMS