Skip to content

Class: AxiosHttpTransportAdapter

Class: AxiosHttpTransportAdapter

Defined in: auth-server-nest/src/adapters/axios-transport.adapter.ts:17

Axios-backed implementation of HttpTransportPort from the vanilla TS core.

The NestJS adapter wires one instance per AuthClient module — it’s a cheap way to bridge the axios surface (which everyone in our stack already understands) to the port the core requires. Consumers that prefer a different HTTP client can build their own adapter and register it as the AUTH_HTTP_TRANSPORT provider.

Implements

  • HttpTransportPort

Constructors

Constructor

new AxiosHttpTransportAdapter(opts?): AxiosHttpTransportAdapter

Defined in: auth-server-nest/src/adapters/axios-transport.adapter.ts:20

Parameters

opts?
baseURL?

string

defaultHeaders?

Record<string, string>

timeout?

number

Returns

AxiosHttpTransportAdapter

Methods

get()

get<T>(url, config?): Promise<HttpResponse<T>>

Defined in: auth-server-nest/src/adapters/axios-transport.adapter.ts:28

Type Parameters

T

T = unknown

Parameters

url

string

config?

HttpRequestConfig

Returns

Promise<HttpResponse<T>>

Implementation of

HttpTransportPort.get


post()

post<T>(url, body?, config?): Promise<HttpResponse<T>>

Defined in: auth-server-nest/src/adapters/axios-transport.adapter.ts:33

Type Parameters

T

T = unknown

Parameters

url

string

body?

unknown

config?

HttpRequestConfig

Returns

Promise<HttpResponse<T>>

Implementation of

HttpTransportPort.post