beginner · http

PUT vs PATCH

What's the difference between PUT and PATCH, and when does the choice actually matter?

Practical scenario

A mobile client built against last year's user model PUTs a profile update and silently erases the `pronouns` field added since.

What it tests

  • • Replace vs partial-modify semantics
  • • Idempotency of each method
  • • The null-vs-absent trap in partial updates