TsgcHTTP2Client › Methods › ConnectAsync
Opens the HTTP/2 session and sends a non-blocking GET; the response is routed to OnHTTP2Response.
procedure ConnectAsync(const aURL: string);
| Name | Type | Description |
|---|---|---|
aURL | const string | Absolute URL used for the initial GET request. The scheme determines whether the transport is TLS-encrypted (h2) or cleartext (h2c). |
Unlike Connect, this variant returns immediately after dispatching the request. The response body and headers are delivered asynchronously through the OnHTTP2Response event, keeping the calling thread free to issue additional requests on the same multiplexed session.
oClient.OnHTTP2Response := OnHTTP2ResponseEvent;
oClient.ConnectAsync('https://api.example.com/status');