Optionalchecktrue to throw an ERR_HTTP_RESOURCE_CHANGED error when the ETag, Last-Modified or total size headers
returned by a range request differ from the ones returned by the first range request, i.e. when the resource has
been modified while being read. Headers missing from the responses are ignored, note that Access-Control-Expose-Headers
must include them when the resource is fetched cross-origin.
Optionalcombinetrue to use Range: bytes=-22 on the first request and cache the EOCD, make sure beforehand that the server supports a suffix range request.
Optionalforcetrue to always use Range headers when fetching data.
OptionalheadersThe HTTP headers.
OptionalmaximumThe maximum size in bytes of the range requests sent to read the data of an entry. The data is read with as many range requests as necessary, each response body being streamed, so that the size of a request never depends on the size of the entry.
Because response bodies are streamed with backpressure, this value does not bound how much data
is buffered in memory; it bounds the byte span, and therefore the lifetime, of each individual
range request. Smaller windows keep each request short-lived, which avoids the idle or duration
timeouts enforced by servers, CDNs and proxies when a slow consumer holds a connection open, and
avoids relying on the server honoring very large ranges. Set it to Infinity to disable windowing
and read each entry with a single range request covering its whole remaining length.
Optionalpreventtrue 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.
Optionalusetrue to use Range headers when fetching data from servers returning Accept-Ranges headers.
Optionalusetrue to rely XMLHttpRequest instead of fetch to fetch data.
OptionalfetchThe 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.
Optionalinit: RequestInit
Represents the options passed to the constructor of HttpReader.