IFClite TypeScript API
    Preparing search index...

    Interface FetchResponseLike

    Minimal response surface the reader needs; the global fetch satisfies it. body is read as a stream and stopped at the remaining byte budget; a response without body is read whole with arrayBuffer(), so only a streaming body bounds the memory a single response can take.

    interface FetchResponseLike {
        body?:
            | {
                cancel?(reason?: unknown): Promise<void>;
                getReader(): ReadableStreamDefaultReader<Uint8Array<ArrayBufferLike>>;
            }
            | null;
        headers?: { get(name: string): string | null };
        ok: boolean;
        status: number;
        url?: string;
        arrayBuffer(): Promise<ArrayBuffer>;
    }
    Index
    body?:
        | {
            cancel?(reason?: unknown): Promise<void>;
            getReader(): ReadableStreamDefaultReader<Uint8Array<ArrayBufferLike>>;
        }
        | null
    headers?: { get(name: string): string | null }

    Not used for the budget (Content-Length is the encoded size); kept so a response from fetch is accepted as is.

    ok: boolean
    status: number
    url?: string

    Final URL after redirects; re-checked against the URL policy when it differs from the requested one.

    • Returns Promise<ArrayBuffer>