Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

node-reqwest

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-reqwest

Node.js bindings for reqwest - Rust HTTP client library

Source
npmnpm
Version
0.0.15
Version published
Weekly downloads
632
1655.56%
Maintainers
1
Weekly downloads
 
Created
Source

node-reqwest

Node.js bindings for reqwest - Rust HTTP client library. This library provides support for system proxy and trusted system CA certificates without additional configuration. The build is made in a fashion that allows usage by Electron-based applications.

Why you want to use this library?

  • DNS resolution using recursive DNS resolver https://github.com/hickory-dns/hickory-dns instead of non-recursive https://github.com/c-ares/c-ares used by Node.js (and Undici) which crashes Electron on Windows if you try to resolve nonexistent domain fetch('http://example.lan')
  • System CA certificates are used by default without additional libraries like https://www.npmjs.com/package/win-ca and https://www.npmjs.com/package/mac-ca
  • System proxy is used by default, while it is not obtainable with Node.js and in Electron you have to use very complex interface https://www.electronjs.org/docs/latest/api/session#sesresolveproxyurl
  • Socks proxy is supported out of the box
  • HTTP/2 performance and support is much better than in Node.js
  • Rustls https://github.com/rustls/rustls is used for TLS

Usage

This library provides an Agent that is fully compatible with the undici.Dispatcher interface. This allows it to be used as a global dispatcher for fetch or with other undici-compatible APIs.

import { Agent } from 'node-reqwest';
import { setGlobalDispatcher } from 'undici';

// Create an agent with system proxy enabled (default)
const agent = new Agent({
  allowH2: true,
  proxy: 'system'
});

setGlobalDispatcher(agent);

// Now all fetch calls will use reqwest under the hood
const response = await fetch('https://example.com');

Install script

Warning: this package uses install script to download precompiled binary for the correct OS and architecture. All the binaries get attached to GitHub release. The releases are made immutable to prevent supply chain attacks.

Keywords

fetch

FAQs

Package last updated on 03 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts