Skip to main content

Reference / Modules / client / AnySourceHttpClient

Class: AnySourceHttpClient<E, R>

client.AnySourceHttpClient

Type parameters

NameType
Eextends Endpoint
RR

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AnySourceHttpClient<E, R>(initialState, axiosFactory, token?): AnySourceHttpClient<E, R>

Type parameters

NameType
Eextends Endpoint
RR

Parameters

NameType
initialStateMultiSourceHttpClientState<E>
axiosFactoryAxiosFactory
token?string

Returns

AnySourceHttpClient<E, R>

Defined in

packages/client/src/Http.ts:100

Properties

axiosFactory

Private axiosFactory: AxiosFactory

Defined in

packages/client/src/Http.ts:113


nodesDown

Private nodesDown: E[]

Defined in

packages/client/src/Http.ts:109


nodesUp

Private nodesUp: E[]

Defined in

packages/client/src/Http.ts:107


token

Private Optional token: string

Defined in

packages/client/src/Http.ts:111

Methods

fetch

fetch(query): Promise<undefined | R>

Parameters

NameType
queryQuery<E, R>

Returns

Promise<undefined | R>

Defined in

packages/client/src/Http.ts:115


getState

getState(): MultiSourceHttpClientState<E>

Returns

MultiSourceHttpClientState<E>

Defined in

packages/client/src/Http.ts:133


selectedEndpointIndex

selectedEndpointIndex(): number

Returns

number

Defined in

packages/client/src/Http.ts:129