A lightweight, Fetch API-like wrapper for making AJAX requests in Node.js or the browser, currently at version 2.7.2. Provides a familiar fetch-style interface with extended options like request cancellation, retries, timeout, and interceptors. Maintained actively with monthly releases. Differentiates itself from similar libraries (e.g., axios, ky) by its minimal overhead and strict adherence to the Fetch API specification, while adding ergonomic features for error handling and response transformation.
npm install za-fetch-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic GET request with retries and timeout using zaFetch, including error handling with ZaFetchError.
Upgrade Node.js to 14 or higher.
Replace 'zaFetch(url, { interceptors: [...] })' with 'const client = createZaFetch({ interceptors: [...] }); client(url, ...)'.Add option 'validateStatus: (status) => true' to treat all statuses as success.
Custom retry logic needed for HTTP errors; consider using interceptors to retry on specific status codes.
Set timeout as the total maximum time per attempt; for a global timeout across retries, implement manual logic.
Increase the timeout value or optimize the request.
Ensure the URL is a valid string: const response = await zaFetch('https://api.example.com');Check network connectivity and server availability; consider increasing retries or using exponential backoff.
No dependency data recorded yet.