In REST, which group of methods is idempotent — repeating the call leaves the same final state as calling it once?
- A.GET, PUT, DELETE
- B.GET, POST, PATCH
- C.POST, PUT, DELETE
- D.Only GET
Answer: A
GET, PUT and DELETE are idempotent: repeating the call leaves the same final state as calling it once. POST is not — each call creates a new record. PATCH depends on payload: setting status = "paid" is idempotent, while add 10 to balance is not. This property determines whether a client can safely retry on network failure.
References