Skip to content
module@warp-drive/core

Interface StoreRequestContext

Defined in: warp-drive-packages/core/src/store/-private/cache-handler/handler.ts:49

The object a Handler uses to fulfill a request: it provides a readonly view of the request and methods for supplying the Future's stream and final response.

Extends

Methods

setResponse()

ts
setResponse(response): void;

Defined in: warp-drive-packages/core/src/types/request.ts:773

Supplies the response for the request.

Parameters

response

| Response | ResponseInfo | null

Returns

void

Inherited from

RequestContext.setResponse


setStream()

ts
setStream(stream): void;

Defined in: warp-drive-packages/core/src/types/request.ts:769

Supplies the stream of the response's content, if available, enabling consumers to monitor download progress via RequestLoadingState.

Parameters

stream

| ReadableStream<any> | Promise< | ReadableStream<any> | null>

Returns

void

Inherited from

RequestContext.setStream

Properties

id

ts
id: number;

Defined in: warp-drive-packages/core/src/types/request.ts:763

a unique id for this request

Inherited from

RequestContext.id


request

ts
request: Readonly<Omit<RequestInfo<unknown>, "controller">> & object & object;

Defined in: warp-drive-packages/core/src/store/-private/cache-handler/handler.ts:50

Type Declaration

bodyUsed?
ts
readonly optional bodyUsed?: boolean;

Whether the request body has been read.

cacheOptions?
ts
readonly optional cacheOptions?: Readonly<CacheOptions>;

see CacheOptions

data?
ts
readonly optional data?: Readonly<Record<string, unknown>>;

see RequestInfo.data

headers?
ts
readonly optional headers?: ImmutableHeaders;

see ImmutableHeaders

options?
ts
readonly optional options?: Readonly<Record<string, unknown>>;

see RequestInfo.options

Type Declaration

store
ts
store: Store;

the store instance the request was issued through, used to enable store-aware cache handling.

See

ImmutableRequestInfo

Overrides

RequestContext.request

Released under the MIT License.