CS FundamentalsModerateProduct-company MCQ pattern

How many of the following HTTP methods are idempotent by the HTTP specification: GET, PUT, DELETE, POST?

  1. A. Only one
  2. B. Only two
  3. C. Only three
  4. D. All four

Correct answer: C. Only three

GET, PUT and DELETE are idempotent: repeating them leaves the server in the same state. POST is not. (A repeated DELETE may return 404 the second time, but the server state is unchanged, which is what idempotency means.) So three are idempotent.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic