HttpClient

new HttpClient(customOptions)

Constructor of HttpClient

Parameters:
NameTypeDescription
customOptions

User-provided ky configuration options.

Author
  • Nur Rony<pro.nmrony@gmail.com> Internal service wrapper for handling specialized HLS network requests via `ky`.

Members

defaultKyOptions

Stores the sanitized ky options.

unSupportedOptions

Methods

(async) fetchText(url)

Fetches content as plain text and validates it as a valid HLS playlist.

Parameters:
NameTypeDescription
url

The URL to fetch.

Throws:

Throws if content fails HLS validation.

Type
InvalidPlayList
Returns:

The validated playlist body.

(async) getStream(url)

Fetches a resource and returns its body as a stream.

Parameters:
NameTypeDescription
url

The URL of the segment or file.

Returns:

The response body stream.