A lightweight library for composing HTTP clients using JavaScript's fetch API. Current stable version is 4.3.1, released with moderate cadence. It provides a middleware-based approach to extend and customize fetch behavior, supporting both client and server environments. Key differentiators include full preservation of fetch API capabilities, an extendable middleware API, and identical usage across Node.js and browsers. Unlike heavier alternatives like axios or superagent, http-client leans on the native fetch standard, allowing polyfills such as isomorphic-fetch for environments without global fetch.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM import is recommended; CommonJS requires destructuring the require.
base is a named export, not the default.
All exports are from the main package, no subpath imports.
Creates a typed fetch client with base URL, Accept header, and JSON parsing middleware.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.