request-modern (v0.1.0) is a Fetch-backed replacement for the deprecated request package, providing callback and promise APIs for HTTP requests. It targets Node.js >=18, is zero-dependency, and ships TypeScript types. Key differentiators: no external dependencies, modern Response objects, and migration-friendly APIs like get, post, request.json and request.text. Released as an independent project with no affiliation to original maintainers.
npm install request-modernNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates callback, promise, and helper methods (json) for HTTP requests.
Upgrade Node.js to >=18 or use a bundler that can handle ESM.
Use response.status, response.headers, and response.text()/json() instead of response.statusCode, response.headers, and response.body.
No fix needed, but be aware of differences in API and behavior.
Use await request.json(url) directly for parsed JSON; use await request(url) and then .json() on the Response for full response access.
Switch to import syntax or use dynamic import: const request = await import('request-modern'); Also ensure Node.js >=18.Replace response.statusCode with response.status.
Use await response.text() or await response.json() to consume the body.
No dependency data recorded yet.