Interface HttpOptions

Represents the options passed to the constructor of HttpReader.

interface HttpOptions {
    combineSizeEocd?: boolean;
    forceRangeRequests?: boolean;
    headers?: Iterable<[string, string]> | Map<string, string>;
    preventHeadRequest?: boolean;
    useRangeHeader?: boolean;
    useXHR?: boolean;

Hierarchy (view full)


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.

Default Value

forceRangeRequests?: boolean

true to always use Range headers when fetching data.

Default Value

headers?: Iterable<[string, string]> | 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.

Default Value

useRangeHeader?: boolean

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

Default Value

useXHR?: boolean

true to rely XMLHttpRequest instead of fetch to fetch data.

Default Value