WHATWG Fetch implementation for Node.js Bare, providing a lightweight, standards-compatible HTTP client for Bare environments. Version 3.0.1 is current, with active development on GitHub. It supports Request, Response, and Headers classes, automatic redirects, abort signals, and form data handling. Unlike node-fetch, it is designed specifically for Bare and uses bare-buffer and bare-abort-controller as peer dependencies. No external runtime dependencies beyond those.
npm install bare-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic GET request, checking response status, and parsing JSON body.
Run 'npm install bare-abort-controller bare-buffer' alongside bare-fetch.
Handle redirect manually or avoid URLs with more than 20 redirects.
Use in a Bare-compatible runtime or consider node-fetch for standard Node.
Use const fetch = require('bare-fetch') and const { Request, Response, Headers } = require('bare-fetch').npm install bare-abort-controller
Use const fetch = require('bare-fetch') correctly. Also ensure you have the right version (v3+).Call buffer() on the Response object, e.g., const data = await res.buffer().