happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
34 lines (30 loc) • 801 B
text/typescript
import type ICachedPreflightResponse from './ICachedPreflightResponse.js';
import type ICacheablePreflightRequest from './ICacheablePreflightRequest.js';
import type ICacheablePreflightResponse from './ICacheablePreflightResponse.js';
/**
* Fetch response cache.
*/
export default interface IPreflightResponseCache {
/**
* Returns cached response.
*
* @param request Request.
* @returns Cached response.
*/
get(request: ICacheablePreflightRequest): ICachedPreflightResponse | null;
/**
* Adds a cached response.
*
* @param request Request.
* @param response Response.
* @returns Cached response.
*/
add(
request: ICacheablePreflightRequest,
response: ICacheablePreflightResponse
): ICachedPreflightResponse | null;
/**
* Clears the cache.
*/
clear(): void;
}