Skip to content

basalt / drives/src / Transport

Type Alias: Transport ​

> Transport = (url, init, pinned) => Promise<{ body: Readable; headers: Record<string, string>; status: number; }>

Defined in: drives/src/fetch.ts:152

What performs the validated request. Replaceable so the guard can be tested without sockets.

Parameters ​

url ​

URL

init ​

body? ​

string | Buffer | Readable

headers ​

Record<string, string>

method ​

string

signal? ​

AbortSignal

timeoutMs ​

number

pinned ​

ValidatedAddress | null

Returns ​

Promise<{ body: Readable; headers: Record<string, string>; status: number; }>

Released under the MIT License.