request-libcurl
v5.0.1
Published
Extremely stable HTTP request module built on top of libcurl
Maintainers
Readme
request-libcurl
Small callback and Promise wrapper around node-libcurl for server-side transfers.
Install
npm install request-libcurlRequires Node.js 22.15 or newer. Use Node.js 22 or 24 in production: Node.js 26 has known native stalls and upload failures. Bun runtime is not supported because node-libcurl requires unsupported libuv APIs.
Quick start
import { requestAsync } from 'request-libcurl';
const { statusCode, headers, body } = await requestAsync({
url: 'https://example.com/data.json',
rejectUnauthorized: true,
rejectUnauthorizedProxy: true,
retry: false
});import request from 'request-libcurl';
request({
url: 'https://example.com',
rejectUnauthorized: true,
rejectUnauthorizedProxy: true,
retry: false
}, (error, response) => {
if (error) throw error;
console.log(response.statusCode);
});const { default: request, requestAsync } = require('request-libcurl');Security default
TLS certificate verification remains disabled by default for compatibility. This permits man-in-the-middle attacks when the network or endpoint is untrusted. Enable verification for normal HTTPS traffic:
request.defaultOptions.rejectUnauthorized = true;
request.defaultOptions.rejectUnauthorizedProxy = true;ESM and CommonJS entry points share these defaults.
Documentation
License
BSD-3-Clause
