Appearance
Head Method
Definition
- Namespace:
JASE.Network - Assembly:
JASE.Network.dll
Task<HttpTransaction> Head(string url, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, ClientCredential credentials = null, CookieCollection cookies = null, CancellationToken cancellationToken = null)
csharp
Task<HttpTransaction> Head(string url, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, ClientCredential credentials = null, CookieCollection cookies = null, CancellationToken cancellationToken = null)Sends an HTTP HEAD request to the specified URL. Retrieves only the response headers without downloading the response body content. Useful for checking resource availability, metadata, or headers without transferring full data.
Parameters
| Name | Description |
|---|---|
cancellationToken | CancellationToken |
cookies | Optional cookies to include in the request. |
credentials | Optional credentials for authentication. |
headers | Optional additional headers to include in the request. |
url | The URL to send the HEAD request to. |
userAgent | The user agent string to include in the request headers. |
Returns
A HttpTransaction containing the response headers and status information.