HTTP methods define the type of operation on a resource. REST APIs use them semantically: the method expresses the intent of the request, not just how data is transferred.
Core methods
GET — retrieve a resource. Idempotent, safe, cacheable
POST — create a resource or perform an action. Not idempotent
PUT — fully replace a resource. Idempotent
PATCH — partially update a resource. Usually not idempotent
DELETE — remove a resource. Idempotent
HEAD — like GET but no response body. For checking existence/metadata
OPTIONS — returns allowed methods. Used in CORS preflight
Safe vs Idempotent
Safe — does not change server state (GET, HEAD, OPTIONS)
Idempotent — repeated calls yield the same result (GET, PUT, DELETE)