Skip to main content

Options

procedure Options(const aURL: string);

Example

procedure ScriptEvent(var Value: variant);
begin
Http.Options('https://api.example.invalid/resources');
Value := Http.Response.Header['Allow'];
end;

Usage

Sends a synchronous bodyless OPTIONS request to the supplied target and captures the server's status, fields and optional response content.

Additional Technical Info

Options selects hmOptions, stores aURL, and synchronously calls Indy's OPTIONS request with a response-content stream. It sends no request body. Pending Content is ignored and then normally cleared during request finalisation.

Inspect Response for status, raw fields such as Allow, and any representation returned by the server. Velox does not parse an option set, perform CORS preflight logic or change later method availability. A server's response is descriptive and can be incomplete or policy-dependent.

The method requires a URL string and does not provide a separate server-wide asterisk-target API. Do not assume that passing a literal * produces a valid origin-form/asterisk-form request through Indy's URL parser.

HTTP error statuses normally remain inspectable; operational failures can raise. Proxy, redirect, cookies, authentication, stored headers and raw-wire logging use the common client pipeline. The call blocks, destinations are unrestricted, and the local SSL path does not enable peer-certificate verification.

External references

Created 2026-07-15