Registry / testing / itsa-fetch

itsa-fetch

JSON →
library1.4.3jsnpmunverified

A promise-based HTTP fetch library for browsers and Node.js, built on top of the Fetch API. Version 1.4.3 provides automatic retry on connection loss, request abort functionality, and full promise-based IO. It is a lightweight alternative to axios or native fetch with retry support. The library has not seen updates recently and is considered in maintenance mode.

npm install itsa-fetch
INSTALL
IMPORT
SIG · ITSA-FETCH
I
itsa-fetch
testingjavascriptv1.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fetch
import fetch from 'itsa-fetch'
const { fetch } = require('itsa-fetch')
itsa-fetch is an ES module with a default export. CommonJS require will not work without a bundler or dynamic import.
fetch
const fetch = require('itsa-fetch').default
const fetch = require('itsa-fetch')
In CommonJS, you must explicitly access the default export.
fetch
import fetch from 'itsa-fetch'
import { fetch } from 'itsa-fetch'
The library exports a single function as default, not a named export.

Shows basic GET request using default export of itsa-fetch with async/await.

import fetch from 'itsa-fetch'; async function getData() { const response = await fetch('https://api.example.com/data'); const data = await response.json(); console.log(data); } getData().catch(console.error);
Debug
Known issues
gotchaCommonJS require does not work as expected; requires .default access.
fix
Use dynamic import or switch to ES modules.
affects: >=1.0.0
deprecatedLibrary is no longer actively maintained; last release in 2019.
fix
Consider migrating to native fetch (available in modern environments) or a maintained alternative like ky or axios.
affects: >=1.0.0
gotchaAutomatic retry on connection lost may cause duplicate requests in some cases.
fix
Update to latest version or implement custom retry logic.
affects: <1.4.3
Errors
Common errors & fixes
TypeError: fetch is not a function
Trying to use fetch as a named import instead of default import.
fix
Use 'import fetch from "itsa-fetch"' (default import) insted of 'import { fetch } from "itsa-fetch"'.
Cannot find module 'itsa-fetch'
Package not installed or used in an environment without module resolution.
fix
Run 'npm install itsa-fetch' and ensure you are in a Node.js or bundler context that supports ES modules.
Upgrade
Version history
1.4.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources