OPTIONS Method

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 bodySuccessful response has bodySafeIdempotentCacheableAllowed in HTML forms
NoMayYesYesNoNo

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 request OPTIONS 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 of key=value pairs.

Anki

References


  1. MDN. “OPTIONS method”. Available at: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/OPTIONS . (Accessed: [2025-05-06 Tue 23:03]). ↩︎

Random Posts