Small callback and Promise wrapper around node-libcurl for server-side transfers.
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.
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');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;BSD-3-Clause