@seriouslag/httpclient
Version:
Typed wrapper HttpClient for axios
13 lines (12 loc) • 667 B
TypeScript
import { Request, HttpResponse } from '../Adaptors';
import { ExponentialBackoffRequestStrategy } from './ExponentialBackoffRequestStrategy';
/** Retries HTTP requests immediately on non successful HTTP request until the max retry count.
* Stops retrying when a TOO MANY REQUESTS STATUS is received (status code: 429)
*/
export declare class MaxRetryHttpRequestStrategy extends ExponentialBackoffRequestStrategy {
/**
* @param maxRetryCount - The maximum number of retries to attempt, default is 5, set to 0 for indefinite retries
*/
constructor(maxRetryCount?: number);
request<T = unknown>(request: Request<T>): Promise<HttpResponse<T>>;
}