request-promise-core is a foundational library that provides Promise support for the now-deprecated 'request' HTTP client. It is not intended for direct use by most applications; instead, it serves as the core logic for higher-level packages like `request-promise`, `request-promise-any`, `request-promise-bluebird`, and `request-promise-native`. Published last on July 22, 2020, this package's development has ceased, mirroring the abandonment of its peer dependency, 'request'. It offers a mechanism to inject Promise capabilities (e.g., `.then()`, `.catch()`) into the `request` object via a `configure` function, requiring a compatible Promise implementation to be explicitly passed. Due to the deprecation of its upstream 'request' dependency, this package is considered obsolete and should not be used in new projects.
npm install request-promise-coreVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to apply Promise capabilities to the 'request' library using `request-promise-core`, including safe loading with `stealthy-require` and basic error handling.
Migrate away from 'request-promise-core' and the 'request' ecosystem entirely. Recommended alternatives include Axios, `node-fetch`, or the built-in `fetch` API in Node.js >= 18.
Always load `request` via `stealthy-require` as shown in the package's usage example to ensure a consistent, patched instance across your application: `const request = stealthyRequire(require.cache, () => require('request'));`Avoid using `request-promise-core/configure/request-next`. Stick to `request-promise-core/configure/request2` for compatibility with `request@^2.34`, though migration away from the entire ecosystem is strongly advised.
If encountering this package as a direct dependency, reassess the need. It's almost certainly part of a deprecated chain. Migrate to a modern HTTP client.
Install the 'request' package: `npm install --save request`.
Ensure `request-promise-core`'s `configure` function is called to patch `request`, and that `request` is loaded using `stealthyRequire` as recommended in the documentation to avoid using an unpatched instance.
Ensure `PromiseImpl: Promise` (for native Promises) or a specific Promise library constructor (e.g., `PromiseImpl: Bluebird`) is provided to the `configure` function.