Alokai

FetchOptions

interface FetchOptions {
	retryCondition?: (error: any) => boolean;
	retryDelay?: number;
	retryDelayOptions?: {
    base?: number;
    customBackoff?: (retryCount: any, error: any) => number;
  };
	retryLimit?: number;
	timeout?: number;
}

Properties

NameRequiredTypeDescription
retryConditionOptional(error: any) => booleanA function to determine if the error can be retried. [default: retry on statuses 408, 429]
retryDelayOptionalnumberThe retry delay in ms of the fetch request. [default: 300]
retryDelayOptionsOptional{ base?: number; customBackoff?: (retryCount: any, error: any) => number; }The retry delay options of the fetch request.
retryLimitOptionalnumberThe retry settings of the fetch request. [default: 5]
timeoutOptionalnumberThe timeout in ms of the fetch request. [default: 30000]

On this page