Optional
baseURL?: string | ((endpoint: Endpoint) => string)The base to be used as base URL for this API. If omitted, the value provided in each endpoint's target
will be used.
A map of Endpoint for the API
Optional
errorOptional
headers?: Record<string, HeaderValue>Any headers that should be applied to each request. Notice that if a header value is DynamicHeaderValue, the function will be called with the current request as argument, so conditional logic can be applied to generate the value.
Optional
meta?: Record<string, any>Any metadata that should be attached to the API for later reference
The name of the API to be referenced in HTTPRequestFactory.createAPIRequest If the name is 'default' it will be used as the default API when calling HTTPRequestFactory.createAPIRequest with one argument (the name of the endpoint).
Optional
queryOptional
requestOptional
responseAn optional ResponseBodyTransformer function to be applied to all of the API's responses.
Configuration for an API to be added with HTTPRequestFactory.withAPIConfig