Skip to main content

CachableResponse

Overview

A client-side cachable response.

Remarks

Etag caching is supported when CachableResponse is constructed with the needed parameters. You may want to disable caching in your browser development tools to avoid this behavior while debugging.

Usage

import { CachableResponse } from 'keywork/http/classes'

Hierarchy

Constructors

constructor

new CachableResponse

(body, request?, etag?, cacheControlOptions?, headersInit?)

Parameters

NameTypeDescription
bodynullBodyInit
request?Request
etag?nullstring
cacheControlOptions?Partial<[CacheControlDirectives](/modules/http/headers/caching/interfaces/CacheControlDirectives)>
headersInit?HeadersInit

Overrides

Response.constructor

Defined in

http/classes/CachableResponse.ts:29