Registry / http-networking / client-http

client-http

JSON →
library0.0.7jsnpmunverified

The `client-http` package, at its final release version 0.0.7, provided a simplified API for making HTTP/HTTPS requests in Node.js. Its core features included automatic proxy detection via the `http_proxy` environment variable, manual proxy configuration, basic cookie management, and automatic handling of HTTP 301/302 redirects. It also allowed for custom request headers and timeout settings. Development ceased due to the existence of the more comprehensive 'request' library, and the project is explicitly marked as abandoned by its maintainer. The library's `engines` configuration strictly targets very old Node.js versions (`>=0.6.11 <=0.7.0 || >=0.7.3`), making it fundamentally incompatible with modern Node.js runtimes and entirely unsuitable for current development due to severe security vulnerabilities and lack of maintenance. There is no ongoing release cadence.

npm install client-http
INSTALL
IMPORT
SIG · CLIENT-HTTP
C
client-http
http-networkingjavascriptv0.0.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client-http
const http = require('client-http');
import http from 'client-http';
This library is CommonJS-only and does not support ES Modules syntax. Attempting to use `import` will result in a runtime error in modern Node.js.
http.get
const http = require('client-http'); http.get('http://example.com', (data, err, cookie, headers) => { /* ... */ });
import { get } from 'client-http';
Methods like `get` are exported as properties of the main `http` object, not as named exports from the module root.
http.request
const http = require('client-http'); http.request('http://example.com', (data) => { /* ... */ }, 'body', { 'Content-Type': 'text/plain' });
import { request } from 'client-http';
Similar to `get`, `request` is a method on the `http` object. It supports POST requests with body and custom headers.
http.setProxy
const http = require('client-http'); http.setProxy('http://127.0.0.1:8080');
import { setProxy } from 'client-http';
This function globally configures the proxy for subsequent requests. It's not a per-request option.

Demonstrates making basic HTTP GET requests to Google and Example.com, logging response data and showing how to set a global timeout.

const http = require('client-http'); // Make a simple HTTP GET request to Google http.get("http://www.google.com/", function(data, err, cookie, headers){ if (err) { console.error("Error:", err); return; } console.log("Response Data (truncated):"); console.log(data ? data.substring(0, 200) + '...' : '[No Data]'); console.log("Headers:", headers); }); // Example of setting a timeout http.setTimeout(5000); // Set timeout to 5 seconds http.get("https://www.example.com/", function(data, err){ if (err) { console.error("Timeout Error or other issue:", err); return; } console.log("Example.com response received within 5s."); });
Debug
Known issues
breakingThe package is explicitly abandoned and has not received updates since its final release (0.0.7). It is highly insecure due to unpatched vulnerabilities in its dependencies and its own codebase.
fix
Migrate to a actively maintained and secure HTTP client library like `axios`, `node-fetch`, or Node.js's built-in `http`/`https` modules.
affects: 0.0.7
breakingThis library is designed for extremely old Node.js versions (>=0.6.11 <=0.7.0 || >=0.7.3). It will not run correctly on modern Node.js versions (v10+, v12+, etc.) due to API changes, C++ addon incompatibilities, and updated security protocols.
fix
Do not use this package in any current or recent Node.js environment. It is incompatible and will cause runtime errors or unexpected behavior.
affects: 0.0.7
gotchaThe API is entirely callback-based, which is an outdated pattern for asynchronous operations. It does not support Promises or `async/await`, making integration into modern JavaScript codebases cumbersome.
fix
If migrating, adapt your logic to use modern async patterns (Promises, `async/await`) with a contemporary HTTP client library.
affects: 0.0.7
gotchaAutomatic proxy detection relies on the `http_proxy` environment variable. Manual proxy setting is global via `http.setProxy()`, not configurable per-request, which can be limiting for applications requiring fine-grained proxy control.
fix
For per-request proxy settings or more robust proxy management, a different library is required.
affects: 0.0.7
Errors
Common errors & fixes
Error: require() of ES Module ... not supported
Attempting to import `client-http` using `import` syntax in a Node.js ES Module project.
fix
This library is CommonJS-only. If you must use it (which is strongly discouraged), ensure your file is treated as CommonJS (e.g., `.js` file without `"type": "module"` in `package.json`) and use `const http = require('client-http');`.
Error: ERR_OSSL_EVP_UNSUPPORTED
Running `client-http` on modern Node.js versions (e.g., Node.js 17+) where legacy OpenSSL ciphers and hash functions used by the old library or its dependencies are disabled by default.
fix
This error signifies fundamental incompatibility with modern Node.js security standards. The only 'fix' is to *not use* this abandoned library. As a temporary workaround for *testing purposes only* (never in production), you can set `NODE_OPTIONS='--openssl-legacy-provider'` environment variable, but this significantly reduces security and does not resolve other issues.
Error: The 'engines' field is defined with an unsupported Node.js version.
Node Package Manager (npm) or Yarn attempting to install `client-http` when the current Node.js version falls outside the very narrow range specified in the `package.json` engines field (`>=0.6.11 <=0.7.0 || >=0.7.3`).
fix
This is an installation-time warning/error indicating the package is not designed for your Node.js version. It's a strong signal to *not* use this library. There is no practical fix for using it with modern Node.js.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies
node-tunnelrequiredUsed for HTTPS tunneling through an HTTP proxy.
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
client-http — npm install client-http · libregistry