HTTP utility module for the browser version of btch-downloader.
- Source
Members
(inner) API_URL :string
The base URL for the backend API.
Type:
- string
- Source
(inner) VERSION :string
The current version of the library.
Type:
- string
- Source
(inner) developer :string
The developer signature for the library.
Type:
- string
- Source
(inner) issues :string
The URL for reporting issues.
Type:
- string
- Source
Methods
(async, inner) httpGet(endpoint, param) → {Promise.<any>}
Performs a GET request to the backend API.
Parameters:
| Name | Type | Description |
|---|---|---|
endpoint | string | The API endpoint to call. |
param | string | The parameter (usually a URL or search query) to pass to the endpoint. |
- Source
Throws:
If the HTTP request fails.
- Type
- Error
Returns:
A promise that resolves to the JSON or text response from the API.
- Type:
- Promise.<any>