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-httpVerified import paths — ran on the pinned version, not inferred.
Demonstrates making basic HTTP GET requests to Google and Example.com, logging response data and showing how to set a global timeout.
Migrate to a actively maintained and secure HTTP client library like `axios`, `node-fetch`, or Node.js's built-in `http`/`https` modules.
Do not use this package in any current or recent Node.js environment. It is incompatible and will cause runtime errors or unexpected behavior.
If migrating, adapt your logic to use modern async patterns (Promises, `async/await`) with a contemporary HTTP client library.
For per-request proxy settings or more robust proxy management, a different library is required.
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');`.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.
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.