Skip to content

Commit

Permalink
Update rules/rest-api-design/rule.md
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Mackay [SSW] <[email protected]>
  • Loading branch information
jeoffreyfischer and danielmackay authored Oct 31, 2024
1 parent ed5f4b6 commit b15ce55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rules/rest-api-design/rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ This provides a much more consistent API structure when querying both collection

### 3. Idempotent requests

Design `GET`, `PUT` and `DELETE` operations as idempotent, where repeating an action yields the same result as performing it once. This avoids unintended actions from repeated requests.
Design requests as idempotent operations, where repeating an action yields the same result as performing it once. This avoids unintended actions from repeated requests.

Typically, `GET`, `PUT` and `DELETE` are idempotent by default, but special handling needs to be added to make `POST` requests idempotent.

::: greybox
If a `DELETE` request removes a record, re-sending it should not throw errors if the record is already deleted.
Expand Down

0 comments on commit b15ce55

Please sign in to comment.