Problem Statement
Which HTTP method is idempotent by design for updating a full resource?
Explanation
PUT replaces the resource state, so repeating the same PUT has the same final effect. POST is not idempotent because each call may create or change additional state.
PATCH is partial update and may or may not be idempotent based on semantics.
Code Solution
SolutionRead Only
# Request
PUT /users/42 {"name":"A"}
# Repeat same request → same final state