foo-webview-sdk
    Preparing search index...

    Interface HttpRequestOptions

    Request options shared by every fb.http.* verb: the HttpGetParams other than url. Defaults: async dispatch with a 30 s host-side timeout, follow redirects, text response type.

    interface HttpRequestOptions {
        async?: boolean;
        headers?: Record<string, string>;
        insecureTls?: boolean;
        redirect?: "error" | "manual" | "follow";
        responseType?: "text" | "arraybuffer" | "base64" | "binary";
        sync?: boolean;
        timeout?: number;
        verifyTls?: boolean;
    }

    Hierarchy

    Index
    async?: boolean

    Return a receipt at once and deliver the response as http:response; false blocks until the response is in.

    true
    
    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

    Skip TLS certificate validation (self-signed, expired, host mismatch, untrusted CA). Modeled after curl --insecure.

    Requires the host-side advanced setting "Allow self-signed / invalid TLS certificates" to be enabled; ignored otherwise. Do not enable for requests carrying credentials — the connection becomes vulnerable to MITM.

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

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

    "follow"
    
    responseType?: "text" | "arraybuffer" | "base64" | "binary"

    Response decoding hint:

    • 'text' (default) — UTF-8 string body. Rejects when the response contains non-UTF-8 bytes; use a binary mode for arbitrary bytes such as .wasm modules or images.
    • 'base64' — body returned as a base64-encoded string.
    • 'arraybuffer' / 'binary' — body is decoded into an ArrayBuffer (transported as base64 under the hood).
    sync?: boolean

    Has no effect; use async: false.

    timeout?: number

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

    30000
    
    verifyTls?: boolean

    Has no effect; use insecureTls to accept invalid certificates.