QA Fundamentals · Middle · Question 38 of 75
An API PUT request is sent twice with the same body. What should a tester expect?
- 1An error, since PUT can only be sent once
- 2The same final state, since PUT should be idempotent
- 3Two records, since every request creates new data
Show the answer
Correct answer: The same final state, since PUT should be idempotent
Explanation
PUT replaces a resource, so repeating it changes nothing further. POST is not idempotent and can create duplicates, which is why retries need care.