mrkeyoor.com_
Wed 23 Sept 02:54 UTC
npmWeb Backendupdated 22 Sept 2026

request-promise-core review

request-promise-core 1.1.4 is internal plumbing that patches the deprecated request HTTP client's prototype with then(), catch(), and promise() methods. It supplies promise construction, status-code errors, transforms, and response selection for request-promise variants. The README tells ordinary users to install a wrapper rather than this package directly. Our fresh install found 6 known vulnerabilities, including 2 critical, and printed 3 deprecation warnings. This is migration-era compatibility code, not a sensible HTTP client dependency for a new backend.

Verdict

request-promise-core 1.1.4 installed with 6 vulnerabilities, including 2 critical, and 3 deprecation warnings in our sandbox. Do not install it for new work; isolate it only inside a short-lived request migration and remove the deprecated request peer with it.

We installed it

Lab card: what happened when we installed request-promise-coreScreenshot of request-promise-core documentation
Install✓ · 3.5s49 packages on disk · 11 MB · 3 deprecation warnings
ImportESM import works · require() works · CommonJS package
Browser1.9 KBgzipped (5.1 KB minified), bundled with esbuild
Typesno TypeScript types found
Known vulns62 critical · 0 high · 4 moderate · 0 low (npm audit)

Answers from our run

Does request-promise-core install cleanly?

Yes. In a fresh container with an empty cache, npm install request-promise-core finished in 4 seconds, leaving 49 packages and 11 MB on disk. npm audit reported 6 known vulnerabilities, 2 of them critical. The install printed 3 deprecation warnings.

How much does request-promise-core add to a browser bundle?

1.9 KB gzipped (5.1 KB minified) when the whole package is bundled for the browser with esbuild. Importing only part of it is usually smaller.

Does request-promise-core work with both ESM and CommonJS?

Yes. Both import 'request-promise-core' and require('request-promise-core') worked in Node 22 in our run. The package is published as CommonJS.

Does request-promise-core include TypeScript types?

No type declarations were found in our install, so TypeScript users need their own declarations.

request-promise-core or undici: which should you use?

undici: Use it for a maintained Node HTTP implementation and fetch-compatible APIs without request prototype patching. request-promise-core 1.1.4 installed with 6 vulnerabilities, including 2 critical, and 3 deprecation warnings in our sandbox.

When should you not use request-promise-core?

You are choosing an HTTP client for new code. Its request peer is deprecated, and this README tells users to choose a higher-level wrapper.

API stability3/5Version 1.1.4 preserves the old request-promise contract for body resolution, full responses, status errors, transforms, callbacks, and custom Promise implementations. Its configurator reaches into Request.prototype.init and private _rp_* properties, which ties stability to request internals rather than a clean public boundary. The code has not changed since the surrounding request ecosystem was deprecated, so compatibility is frozen rather than actively guaranteed.
Docs3/5The README clearly calls this a core package, tells normal users to select a wrapper, lists the request peer, and shows every configurator option needed for direct use. It also documents transform2xxOnly in the change history. The examples still discuss request@next, an alpha line that never replaced request 2, and provide no migration path, modern Node guidance, TypeScript coverage, or warning about the 6 audit findings we measured.
Maintenance1/5npm published version 1.1.4 on July 22, 2020, for a lodash advisory, and GitHub's latest push is May 21, 2021. The repository is unarchived with 10 open issues and pull requests, but its core peer, request 2.88.2, is officially deprecated. Five years without a release leaves no credible route for addressing the 2 critical and 4 moderate findings in our current install.
Ecosystem1/5npm counted 4,413,933 downloads in the week ending August 24, 2026, but this package sits underneath old request-promise dependency trees. GitHub has 20 stars, the README discourages direct installation, and request itself is deprecated. Working CommonJS and ESM loading on Node 22 does not restore an ecosystem whose wrappers and transport layer have stopped normal development.

Use it if

  • An existing request-promise fork already uses this exact core and must be kept running long enough to migrate.
  • You maintain a private compatibility layer with a custom Promise implementation and understand request's prototype internals.
  • A forensic test needs to reproduce request-promise 1.1.4 response and error behavior before replacing it.
Skip it if

Setup reality

We installed request-promise-core 1.1.4 in a fresh Node 22 Bookworm sandbox in 3.5 seconds. npm printed 3 deprecation warnings, left 49 packages and 11 MB on disk, and audit reported 6 known vulnerabilities: 2 critical and 4 moderate. The package has 1 direct dependency, 1 peer dependency, 52 KB unpacked, an ISC license, and no TypeScript declarations. It is CommonJS without an exports map; require() and ESM import both loaded under Node 22.23.2.

Direct setup also requires request ^2.34 because it is a peer. The documented request2 configurator expects a request function, a Promise implementation, and a nonempty list of methods to expose. It intercepts Request.prototype.init, so loading order matters if other code imports an unpatched request instance. The README suggests stealthy-require to isolate the patched copy, another sign that this is framework plumbing rather than an application client.

By default, non-2xx responses reject with StatusCodeError and successful calls resolve to the body. simple: false allows non-2xx results, resolveWithFullResponse: true returns the response, and transform can replace the resolved body. Callback exceptions are rethrown after promise settlement. No credential format is imposed, but request's proxy, TLS, cookie, redirect, and authentication options still govern network behavior.

Our esbuild measurement produced 5.1 KB minified and 1.9 KB gzipped for this package alone; that number excludes the required request peer and its installed graph. Do not use it to justify a browser build. Version 1.1.4 shipped in July 2020, the core repository's last push was May 21, 2021, and the practical setup task is a controlled migration to fetch, undici, got, or axios.

Patterns

Patch an isolated request copy configure-request2

const stealthyRequire = require('stealthy-require');
const request = stealthyRequire(require.cache, () => require('request'));
const configure = require('request-promise-core/configure/request2');

configure({request, PromiseImpl: Promise, expose: ['then', 'catch', 'promise']});

Version 1.1.4 changes Request.prototype.init, so isolate the copy if any dependency also expects an unpatched request module.

Resolve a successful response body request-body

const body = await request({
  uri: 'https://api.example.com/items',
  json: true,
  timeout: 8000,
});

The core resolves to the body by default and rejects non-2xx responses while simple remains true.

Read status and headers return-full-response

const response = await request({
  uri: 'https://api.example.com/items/42',
  resolveWithFullResponse: true,
  json: true,
});
console.log(response.statusCode, response.headers, response.body);

resolveWithFullResponse: true changes the success value from the body to request's response object.

Inspect an error response without rejection accept-non-2xx

const body = await request({
  uri: 'https://api.example.com/items/missing',
  simple: false,
  json: true,
});

simple: false resolves non-2xx bodies, so the caller must check status separately if it also needs the status code.

Transform a JSON body transform-response

const ids = await request({
  uri: 'https://api.example.com/items',
  json: true,
  transform(body) {
    return body.items.map((item) => item.id);
  },
});

A transform may return a promise; a thrown or rejected transform becomes TransformError in version 1.1.4.

Skip transforms for non-2xx replies limit-transform-to-success

await request({
  uri,
  transform: parsePayload,
  transform2xxOnly: true,
});

transform2xxOnly: true prevents the transform from running before a StatusCodeError is created for a failed HTTP status.

Handle a rejected status code inspect-status-error

try {
  await request({uri, json: true});
} catch (error) {
  if (error.name === 'StatusCodeError') {
    console.error(error.statusCode, error.error);
  } else {
    throw error;
  }
}

With simple enabled, version 1.1.4 wraps non-2xx responses in StatusCodeError rather than resolving them.

Detach the underlying promise get-native-promise

const req = request({uri, timeout: 8000});
const promise = req.promise();
req.abort();
await promise;

promise() is available only when it appears in expose; abort() still belongs to the patched request object.

Replace body resolution with fetch migrate-to-fetch

const response = await fetch(url, {signal: AbortSignal.timeout(8000)});
if (!response.ok) {
  throw new Error(`HTTP ${response.status}`);
}
const body = await response.json();

fetch does not reject on 4xx or 5xx, so an explicit response.ok check replaces request-promise's default simple behavior.

Replace full-response access with undici migrate-full-response

import {request as httpRequest} from 'undici';

const {statusCode, headers, body} = await httpRequest(url);
if (statusCode < 200 || statusCode >= 300) throw new Error(`HTTP ${statusCode}`);
const value = await body.json();

Migration tests should compare status handling, redirects, proxy use, cookies, and TLS options before removing the 49-package legacy graph.

Alternatives

PackageRegistryPick it when
undicinpmUse it for a maintained Node HTTP implementation and fetch-compatible APIs without request prototype patching.
gotnpmUse it for a Node-focused client with retries, hooks, pagination, and structured errors.
axiosnpmUse it when one familiar API must cover browsers and Node with interceptors and broad integrations.

More web backend guides

urllib3 · requests · ws · anyio · httpx · undici · the whole shelf →

How this guide is made: grounded in the library's documentation, release notes, changelog, and issue history, on a fixed rubric — not a hands-on install of every release. The 50 most-downloaded entries are additionally install-verified in clean containers. Corrections: contact the desk.