A drop-in replacement for the global fetch API in Node.js, providing enhanced features such as HTTP/2 support, logging, and compatibility with experimental fetch implementations. Version 5.2.0 requires Node.js >=22 and ships TypeScript types. The library exports the standard fetch, Headers, Request, Response, FormData, AbortController, Blob, and EventSource, with HTTP/2 enabled by default and configurable logging via environment variables. It differentiates itself by offering a seamless upgrade path for Node.js fetch with minimal configuration.
npm install extra-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of enhanced fetch with custom headers and async/await error handling.
Upgrade Node.js to v22 or later.
Use import syntax instead. If you must use require, use dynamic import: const { fetch } = await import('extra-fetch')Set environment variable EXTRA_FETCH_HTTP2=false to disable HTTP/2.
Ensure your project is configured as ESM (type: 'module' in package.json) or use dynamic import.
Ensure you import Headers as a named import and use 'new Headers()'.
No dependency data recorded yet.