A lightweight HTTP client library for Node.js and the browser, version 1.1.12. Provides a fetch-like API with additional features such as request/response interceptors, automatic JSON parsing, timeout support, and TypeScript types included. It is designed to be a simple alternative to axios or ky with zero dependencies. However, as of version 1.1.12, it has very limited documentation and community adoption.
npm install yz-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates a basic GET request with authentication and a timeout option using yz-fetch.
Use `{ raw: true }` to get the raw Response object.Use `import yzfetch from 'yz-fetch'` and rely on TypeScript inference.
Replace `onRequest` with `requestInterceptor`.
Catch errors and check `error.status` for HTTP status.
Run `npm install yz-fetch` and use correct ESM import: `import yzfetch from 'yz-fetch'`.
Use `import yzfetch from 'yz-fetch'` (default import).
Replace `onRequest` with `requestInterceptor` in configuration.
No dependency data recorded yet.