Send an HTTP GET request.
http.get("https://iina.io", { headers: { "User-Agent": "IINA" } });
The options for the request, including headers and parameters.
Send an HTTP POST request.
The options for the request, including headers and parameters.
Send an HTTP PUT request.
The options for the request, including headers and parameters.
Send an HTTP PATCH request.
The options for the request, including headers and parameters.
Send an HTTP DELETE request.
The options for the request, including headers and parameters.
Start a XML-RPC client.
The XML-RPC endpoint URL.
Download a file to user's local file system.
// download a file to the plugin's data folder
await http.download("https://example.com/file.zip", "@data/file.zip");
The URL of the file to download.
The destination path, including the file name.
The path follows IINA plugin API's file path convention;
see the file module for more information.
The file-system
permission is required in Info.json
if the destination is outside the plugin's sandbox.
Optional
options: HTTPRequestOption<Record<string, any>> & { The options for the request, including headers and parameters. Additionally, you can specify the HTTP method to use.
Generated using TypeDoc
The
HTTP
module provides a simple interface to make HTTP requests. It also provides a XML-RPC client and adownload
function which can be used to download files to user's disk.Example
Available In Entry
Main and Global