lookup> OPTIONS

OPTIONS

Asks the server about communication options for the target resource; the Allow header lists supported methods.

safeidempotentnot cacheableRFC7231#4.3.7
PropertyValue
Safe (does not modify state)Yes
Idempotent (repeatable)Yes
CacheableNo

Asks the server about communication options for the target resource; the Allow header lists supported methods.

curl -X OPTIONS -i https://api.example.com/users/1
OPTIONS /api/users/1 HTTP/1.1
Host: example.com
OPTIONSGET
Discover allowed methodsRetrieve a representation
Usually no bodyReturns a body

Is the OPTIONS method safe?

OPTIONS is a safe method — it does not change resource state on the server.

What happens if I send OPTIONS repeatedly?

OPTIONS is idempotent — repeated requests have the same effect as a single request.

All HTTP methods

Related status codes

Related headers