UNPKG

lunex-http

Version:

A lightweight and flexible REST API client for JavaScript and TypeScript, supporting CommonJS and ES modules (ESM). Features include HTTP methods (GET, POST, PUT, PATCH, DELETE), built-in retry policies with exponential backoff, request lifecycle hooks fo

7 lines (6 loc) 220 B
/** * Default retry condition for transient errors. * @param response - Fetch API response object * @returns Whether the request should be retried */ export declare function shouldRetry(response: Response): boolean;