Skip to content
module@warp-drive/core

Handler Fetch

ts
const Fetch: object;

Defined in: warp-drive-packages/core/src/request/-private/fetch.ts:134

ts
import { Fetch } from '@warp-drive/core';

A basic Fetch Handler which converts a request into a fetch call presuming the response to be json.

ts
import { RequestManager, Fetch } from '@warp-drive/core';

const manager = new RequestManager()
  .use([Fetch]);

Type Declaration

request()

ts
request<T>(context): Promise<T>;

Issues the request via native fetch, setting the response and (when requested) streaming the decoded body via Context.setStream as it downloads, then resolves with the parsed JSON body.

Type Parameters

T

T

Parameters

context

Context

Returns

Promise<T>

Released under the MIT License.