API Testing · Middle · Question 15 of 75
What does If-Match with an ETag protect against?
- 1Overwriting changes someone else made in between
- 2Reading a resource that the cache already stores
- 3Sending requests to the wrong API version
Show the answer
Correct answer: Overwriting changes someone else made in between
Explanation
If the resource changed since the client read it, the server answers 412 Precondition Failed instead of silently losing an update.