API Design · Junior · Question 5 of 75
What's the difference between PUT and PATCH?
- 1They are identical
- 2
PUTcreates,PATCHdeletes - ✓Correct answer:
PUTreplaces the whole resource with the sent representation;PATCHapplies a partial change
Explanation
With PUT, missing fields mean 'remove or reset'. PATCH changes only what's sent, e.g. using JSON Merge Patch.