TsgcHTTP2Client › Methods › Head
Performs a synchronous HTTP/2 HEAD request, returning only the response headers without any body.
procedure Head(const aURL: string);
| Name | Type | Description |
|---|---|---|
aURL | const string | Absolute URL whose metadata (status, length, content type, cache validators) should be retrieved. |
HEAD is identical to GET except that the server must not return a message body. It is useful for checking resource existence, reading content-length or last-modified, or validating cache entries without paying the cost of the full download. The response headers become available on Request.Headers once the call returns.
oClient.Head('https://api.example.com/download/large.bin');
vSize := oClient.Request.Headers.Values['content-length'];