Table of Contents
About1
The OPTIONS
HTTP method (HTTP verb)
requests permitted communication options for a given URL or server. This can be used to test
the allowed HTTP methods for a request, or to determine whether a request would succeed when making a CORS preflighted request. A
client can specify a URL with this method, or an asterisk (*
) to refer to the entire server.
Characteristics
Request has body | Successful response has body | Safe | Idempotent | Cacheable | Allowed in HTML forms |
---|---|---|---|---|---|
No | May | Yes | Yes | No | No |
Syntax
OPTIONS *|<request-target>["?"<query>] HTTP/1.1
The request may be either in ‘asterisk form’ *
indicating the whole server, or a request target as is commone with other methods:
*
: indicates that the client wishes to requestOPTIONS
for the server as a whole, as opposed to a specific named resource of that server.<request-target>
: identifies the target resource of the request when combined with the information provided in the Host header. This is an absolute path (e.g.,/path/to/file.html
) in requests to an origin server, and an absolute URL in requests to proxies (e.g.,http://www.examples.com/path/to/file.html
).<query>
(Optional): an optional query component preceded by a question-mark?
. Often used to carry identifying information in the form ofkey=value
pairs.
Anki
Links
References
MDN. “OPTIONS method”. Available at: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/OPTIONS . (Accessed: ). ↩︎