CS FundamentalsHardGATE CS · Product company CS fundamentals

Which set contains ONLY idempotent HTTP methods (repeating the same request has the same effect on the server as sending it once)?

  1. A. GET, POST, PUT
  2. B. POST, PATCH, DELETE
  3. C. PUT, POST, HEAD
  4. D. GET, PUT, DELETE

Correct answer: D. GET, PUT, DELETE

GET and HEAD do not change state, PUT replaces a resource with the same content each time, and DELETE leaves the resource deleted. POST (and in general PATCH) can create or change something on every call, which is why browsers warn before resubmitting a POST.

More Computer Networks questions

Exams that ask this topic