TsgcHTTP2ClientMethods › OptionsAsync

OptionsAsync Method

Sends a non-blocking HTTP/2 OPTIONS request; the reply is delivered on OnHTTP2Response.

Syntax

procedure OptionsAsync(const aURL: string);

Parameters

NameTypeDescription
aURLconst stringAbsolute URL of the resource whose supported methods should be probed, or * to query the server as a whole.

Remarks

Non-blocking variant of Options. Dispatches the request and returns instantly; the allowed-methods header and any CORS information arrive through OnHTTP2Response. Often used by long-lived UI clients that discover API capabilities on startup.

Example

oClient.OnHTTP2Response := OnHTTP2ResponseEvent;
oClient.OptionsAsync('https://api.example.com/v1/users');

Back to Methods