Interface: IBaseRestClientConfig
Definition for the configuration of a rest client.
Properties
endpoint
endpoint:
string
The endpoint where the api is hosted.
pathPrefix?
optionalpathPrefix?:string
The prefix to the routes.
headers?
optionalheaders?:IHttpHeaders
The headers to include in requests.
timeout?
optionaltimeout?:number
Timeout for requests in ms.
includeCredentials?
optionalincludeCredentials?:boolean
Include credentials in the request, defaults to true.
customHeaders?
optionalcustomHeaders?: () =>Promise<IHttpHeaders>
Hook to provide headers asynchronously.
Returns
Promise<IHttpHeaders>
A promise that resolves to the headers.
customAuthHeader?
optionalcustomAuthHeader?: () =>Promise<string>
Hook to provide an authorization header value asynchronously.
Returns
Promise<string>
A promise that resolves to the authorization header value.
onAuthFailure?
optionalonAuthFailure?: (err) =>Promise<void>
Hook to handle authorization failures asynchronously.
Parameters
err
IError
Returns
Promise<void>
A promise that resolves when the auth failure handling is complete.