A lightweight middleware layer for fetch requests that allows adding interceptors (before, after) and error handling. Version 0.13.5 is the latest stable release, with no external dependencies. It provides a simple API to compose middleware functions for modifying requests and responses, similar to Express middleware but for the Fetch API. Ships TypeScript definitions. Suitable for small to medium projects needing request/response transforms or logging.
npm install zhi-fetch-middlewareNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a simple logger middleware that logs requests and responses, then applies it to fetch to produce an enhanced fetch function.
Migrate to using createMiddleware() and applyMiddleware() as described in the docs.
Replace with applyMiddleware() which is the new standard.
Ensure all middleware functions are async.
Use `import { createMiddleware } from 'zhi-fetch-middleware'`Import only from 'zhi-fetch-middleware' directly.
No dependency data recorded yet.