An HTTP safe method has essentially read-only requested semantics: the client does not ask the server to change resource state through the operation.
GET and HEAD are examples. The definition concerns what the operation requests, rather than asserting that no incidental activity occurs anywhere on the server.[ref]For example, reading a stored color can return
blue while leaving that color unchanged. The server can still append an access-log entry. A later read can return red if some separate operation changed the color in between; safe semantics do not require an unchanging response or an immutable resource.At the intended-state level, a read-only operation can be modeled as . It follows immediately thatThis illustrates why safe methods are also idempotent. The converse fails: deletion can map both present and absent states to absent, satisfying HTTP idempotence while changing a present resource on its first application.
New to topics? Read the docs here!