REST APIs
This folder has no README. Everything inside it is listed below.
Notes
- Idempotency 5 An operation is idempotent if performing it twice leaves the same server state as performing it once.
- JWT authentication for REST APIs 3 A JWT is a signed token the client sends on every request (Authorization: Bearer <token>); the API verifies the signature and the claims instead of looking…
- Status codes 5 The status code is the part of your response that infrastructure you do not control acts on — caches, retry policies, load balancers, client libraries,…
- PUT vs PATCH: which writes are safe to retry 4 RFC 9110 defines idempotency in one sentence (section 9.2.2): a method is idempotent if "the intended effect on the server of multiple identical requests…
- REST principles 4 REST is an architectural style, not a protocol or a spec: the constraints Roy Fielding set out in chapter 5 of his 2000 dissertation to explain why the web…
- REST Versioning and Pagination 6 Two API-design questions interviewers nearly always ask.
- Richardson Maturity Model and HATEOAS 6 The most-discussed and least-applied REST theory.
- REST Error Handling and HTTP Caching 7 Two cross-cutting REST concerns: consistent error responses (RFC 7807) and HTTP caching (ETag, Cache-Control).
- Stateful and stateless 7 "Is REST stateless?" expects the answer yes.
- Webhooks 5 A webhook is an HTTP callback: instead of you polling a provider, the provider POSTs to a URL you own when something happens.
- Contract-first API design 4 Two ways to arrive at an API spec: write the code and generate the spec from it, or write the spec and generate stubs from it.