Module 03 Summary
What this module established
Methods carry promises about safety and idempotency, and something on the internet will rely on them. A GET that changes state will be triggered by a crawler or a prefetcher you did not write.
Carry forward
- Use the status code to tell the client what to do. A 200 carrying an error makes your failures invisible to every layer between you and the caller.
- JSON has no date or decimal type. Use
Decimalfor money so precision survives the round trip. - Any POST that creates something needs an idempotency key. Retries are not optional behaviour - they are what networks force.
Before moving on
Move on when every outcome has a status code, no endpoint returns 200 with an error, and every creating POST has an idempotency scheme.
