Skip to content

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 ​

NameDescription
cancellationTokenCancellationToken
cookiesOptional cookies to include in the request.
credentialsOptional credentials for authentication.
headersOptional additional headers to include in the request.
urlThe URL to send the HEAD request to.
userAgentThe user agent string to include in the request headers.

Returns ​

A HttpTransaction containing the response headers and status information.