A map of active requests, keyed by their unique identifiers.
Private
defaultDefault headers to include in all requests.
Private
_Internal method for performing an HTTP fetch request.
The URL to fetch.
Options for configuring the request.
Optional
cancellationToken: HsCancellationTokenAn optional cancellation token to cancel the request.
A promise that resolves to the fetch response.
Creates an IHsFetchResponse
object from the given event and transfer.
The URL event containing the response data.
The URL transfer object.
The normalized fetch response.
Performs an HTTP fetch request.
The URL to fetch.
Options for configuring the request.
Optional
cancellationToken: HsCancellationTokenAn optional cancellation token to cancel the request.
A promise that resolves to the fetch response.
Private
normalizeNormalizes response headers by converting all keys to lowercase.
The response headers.
The normalized headers.
HsFetch
is a custom implementation of an HTTP client for managing asynchronous requests. It supports features like cancellation tokens, custom headers, and response normalization.