docs/interfaces/lib.Configuration.html
interface Configuration {
baseUrl: string;
parseError: (response: Response) => Promise<Error>;
fetch?: FetchAPI;
middleware?: Middleware[];
agent?: Dispatcher;
headers?: HTTPHeaders;
timeoutDuration?: number;
retry?: RetryConfiguration;
}
baseUrlparseErrorfetch?middleware?agent?headers?timeoutDuration?retry?
baseUrl: string
parseError: (response: Response) => Promise<Error>
Optionalfetchfetch?: FetchAPI
Provide your own fetch implementation.
Optionalmiddlewaremiddleware?: Middleware[]
Provide a middleware that will run either before the request, after the request or when the request fails.
Optionalagentagent?: Dispatcher
Pass your own http agent to support proxies.
Optionalheadersheaders?: HTTPHeaders
Custom headers that will be added to every request.
OptionaltimeoutDurationtimeoutDuration?: number
Timeout in ms before aborting the request (default 10,000)
Optionalretryretry?: RetryConfiguration
Retry configuration.
Member Visibility
ThemeOSLightDark
Properties baseUrlparseErrorfetchmiddlewareagentheaderstimeoutDurationretry