Skip to content

Class: FetchTransport

Class: FetchTransport

Defined in: auth-client/src/core/adapters/fetch-transport.ts:58

Wraps fetch. The default is a thin fetch wrapper that attaches the Authorization header when the SDK has a token. Custom impls can add retry, circuit breaking, observability, etc.

Implements

Constructors

Constructor

new FetchTransport(opts): FetchTransport

Defined in: auth-client/src/core/adapters/fetch-transport.ts:64

Parameters

opts

FetchTransportOptions

Returns

FetchTransport

Methods

request()

request<T>(req): Promise<TransportResponse<T>>

Defined in: auth-client/src/core/adapters/fetch-transport.ts:71

Type Parameters

T

T = unknown

Parameters

req

TransportRequest

Returns

Promise<TransportResponse<T>>

Implementation of

Transport.request