serwist
Version:
A Swiss Army knife for service workers.
18 lines • 744 B
TypeScript
import type { SerwistPlugin } from "../../types.js";
/**
* Makes it easy for a request with a `Range` header to be fulfilled by a cached response.
*
* It does this by intercepting the `cachedResponseWillBeUsed` plugin callback
* and returning the appropriate subset of the cached response body.
*/
export declare class RangeRequestsPlugin implements SerwistPlugin {
/**
* @param options
* @returns If request contains a `Range` header, then a
* partial response whose body is a subset of `cachedResponse` is
* returned. Otherwise, `cachedResponse` is returned as-is.
* @private
*/
cachedResponseWillBeUsed: SerwistPlugin["cachedResponseWillBeUsed"];
}
//# sourceMappingURL=RangeRequestsPlugin.d.ts.map