new HttpClient(customOptions)
Constructor of HttpClient
Parameters:
| Name | Type | Description |
|---|---|---|
customOptions | User-provided ky configuration options. |
- Source
Members
defaultKyOptions
Stores the sanitized ky options.
- Source
unSupportedOptions
- Source
Methods
(async) fetchText(url)
Fetches content as plain text and validates it as a valid HLS playlist.
Parameters:
| Name | Type | Description |
|---|---|---|
url | The URL to fetch. |
- Source
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:
| Name | Type | Description |
|---|---|---|
url | The URL of the segment or file. |
- Source
Returns:
The response body stream.
