Client
Properties
Methods
createClient
Creates the axios client used for requests As part of the creation, we configure the retry conditions and the exponential backoff approach.
Parameters
user supplied configurations
Returns
normalizeHeader
Parameters
header
stringRequiredReturns
string
stringnormalizeHeaders
Parameters
obj
objectRequiredReturns
Record
Record<string, any>Requiredrequest
Axios request
Parameters
request method
path
stringRequiredrequest path
payload
Record<string, any>Requiredrequest payload
Default: {}
axios configuration
Default: {}
customHeaders
Record<string, any>Requiredcustom request headers
Default: {}
Returns
Promise
Promise<any>RequiredrequiresAuthentication
Parameters
path
anyRequiredmethod
anyRequiredReturns
boolean
booleansetHeaders
Creates all the initial headers. We add the idempotency key, if the request is configured to retry.
Parameters
user supplied headers
request method
path
stringRequiredrequest path
customHeaders
Record<string, any>Requireduser supplied headers
Default: {}
Returns
AxiosRequestHeaders
Record<string, string>RequiredshouldRetryCondition
Parameters
Returns
boolean
booleanWas this section helpful?