foo-webview-sdk
    Preparing search index...

    Interface HttpDownloadParams

    Parameters for http.download. Download a URL into a file, creating the missing folders. By default the call blocks until the file is written; with async: true it returns a receipt at once and the outcome arrives as http:downloadComplete. Downloads over 500 MB fail with OPERATION_FAILED.

    interface HttpDownloadParams {
        async?: boolean;
        headers?: Record<string, string>;
        insecureTls?: boolean;
        redirect?: "error" | "manual" | "follow";
        saveTo: string;
        timeout?: number;
        url: string;
    }
    Index
    async?: boolean

    Return a receipt at once and deliver the outcome as http:downloadComplete; false blocks until the file is written.

    false
    
    headers?: Record<string, string>

    Custom request headers. User-Agent overrides the host default on the initial request. A header whose name or value contains a line break is dropped. Custom headers are omitted after a redirect, including User-Agent, so redirected requests use the host default.

    insecureTls?: boolean

    Accept invalid or self-signed certificates; takes effect only when the host setting allows insecure TLS as well.

    false
    
    redirect?: "error" | "manual" | "follow"

    follow follows up to 10 redirects; error fails with OPERATION_FAILED on a redirect; manual saves the redirect response as it is.

    "follow"
    
    saveTo: string

    File to write; path variables are expanded and missing folders are created. An existing file is replaced.

    timeout?: number

    Timeout in milliseconds for resolving, connecting, sending and receiving each; 0 or less keeps the WinHTTP defaults.

    60000
    
    url: string

    URL to download; only http and https are allowed.