Reference / Modules / client / AnySourceHttpClient
Class: AnySourceHttpClient<E, R>
client.AnySourceHttpClient
Type parameters
| Name | Type |
|---|---|
E | extends Endpoint |
R | R |
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new AnySourceHttpClient<E, R>(initialState, axiosFactory, token?): AnySourceHttpClient<E, R>
Type parameters
| Name | Type |
|---|---|
E | extends Endpoint |
R | R |
Parameters
| Name | Type |
|---|---|
initialState | MultiSourceHttpClientState<E> |
axiosFactory | AxiosFactory |
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
| Name | Type |
|---|---|
query | Query<E, R> |
Returns
Promise<undefined | R>
Defined in
packages/client/src/Http.ts:115
getState
▸ getState(): MultiSourceHttpClientState<E>
Returns
Defined in
packages/client/src/Http.ts:133
selectedEndpointIndex
▸ selectedEndpointIndex(): number
Returns
number