venus-fetch (vFetch) is a lightweight, easy-to-use fetch wrapper for making HTTP requests in browser environments. Current stable version 1.1.17. It provides a simplified API with support for GET, POST, PUT, DELETE, and OPTIONS methods, request/response interceptors (before/after hooks), configurable timeout, automatic Content-Type handling (form-urlencoded, multipart/form-data, JSON), file upload/download support, and built-in error codes. It differentiates itself by its hook system and global error handling, though it lacks TypeScript types, ESM modules, and server-side (Node.js) support.
npm install venus-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an HTTP client with base URL '/api', hooks, and timeout, then makes a GET request.
Use a different library like 'node-fetch' or 'axios' for server-side code.
Use VFetch(config) without 'new'.
Ensure baseUrl does not end with '/'.
Pass error handler via VFetch({ error: (e) => ... })Remove 'new': const http = VFetch(opt)
Ensure VFetch is called: const http = VFetch(config); http.get(...)
Include the script: <script src='../dist/vFetch.js'></script> or correct import path
No dependency data recorded yet.