How do PUT and PATCH differ, and how does that affect DTO design?
Short answer
PUT sends all the new data: a field you leave out is treated as removed. PATCH sends only what changes, so it must tell "not sent" apart from "sent as null".
3 points to say:
- PUT replaces everything and is idempotent.
- PATCH: absent differs from
null. - Concurrent edits use
If-Match.
Keep reading the deep dive
Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.