Promised-http is an early, proof-of-concept HTTP library for Node.js that wraps the native `http` module with promises (specifically the `q` library). Version 0.0.2 is the latest and only release, with no updates since 2011. It predates modern promise patterns and ES6 Promises, making it obsolete. Key differentiators: one of the first promise-based HTTP clients, but now superseded by `axios`, `node-fetch`, and `got`. Not recommended for new projects.
npm install promised-httpVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic GET request using the promise-based `request` function from promised-http. Note: The library is outdated and not recommended for production.
Replace with a maintained HTTP client library.
Convert `q` promises to native Promises using `Q()` or upgrade to a library with native promises.
Use the `http.request` options object; do not pass a URL string.
Use Node's `https` module or a modern library that handles both HTTP and HTTPS.
Use an isomorphic library like `axios` or `fetch` for cross-platform support.
Run `npm install q` to install `q` as a dependency.
Ensure you import using ES6 `import` syntax or correctly convert the `q` promise to native.
Use `import http from 'promised-http'` and then call `http.request(options)`.