@zip.js/zip.js
    Preparing search index...

    Interface HttpOptions

    Represents the options passed to the constructor of HttpReader.

    interface HttpOptions {
        combineSizeEocd?: boolean;
        forceRangeRequests?: boolean;
        headers?: Iterable<[string, string], any, any> | Map<string, string>;
        preventHeadRequest?: boolean;
        useRangeHeader?: boolean;
        useXHR?: boolean;
        fetch?(input: string, init?: RequestInit): Promise<Response>;
    }

    Hierarchy (View Summary)

    Index
    combineSizeEocd?: boolean

    true to use Range: bytes=-22 on the first request and cache the EOCD, make sure beforehand that the server supports a suffix range request.

    false
    
    forceRangeRequests?: boolean

    true to always use Range headers when fetching data.

    false
    
    headers?: Iterable<[string, string], any, any> | Map<string, string>

    The HTTP headers.

    preventHeadRequest?: boolean

    true to prevent using HEAD HTTP request in order the get the size of the content. false to explicitly use HEAD, this is useful in case of CORS where Access-Control-Expose-Headers: Content-Range is not returned by the server.

    false
    
    useRangeHeader?: boolean

    true to use Range headers when fetching data from servers returning Accept-Ranges headers.

    false
    
    useXHR?: boolean

    true to rely XMLHttpRequest instead of fetch to fetch data.

    false
    
    • The function used to fetch the data. It takes precedence over HttpRangeOptions#useXHR when set. The returned object must expose the status, statusText and headers properties, and the arrayBuffer() method of the Response class.

      Parameters

      • input: string
      • Optionalinit: RequestInit

      Returns Promise<Response>

      fetch