{"_id":"@request/promise-core","_rev":"54539","name":"@request/promise-core","description":"Core Promise support implementation for the simplified HTTP request client 'request'.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"time":{"modified":"2021-06-03T10:16:37.000Z","created":"2016-05-06T21:06:04.406Z","1.1.0":"2016-07-30T22:01:29.381Z","1.0.0":"2016-07-15T22:30:59.959Z","1.0.0-rc.1":"2016-07-11T00:47:03.512Z","0.0.1":"2016-05-07T07:07:29.179Z","0.0.0":"2016-05-06T21:06:04.406Z"},"users":{},"author":{"name":"Nicolai Kamenzky","url":"https://github.com/analog-nico"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"versions":{"1.1.0":{"name":"@request/promise-core","version":"1.1.0","description":"Core Promise support implementation for the simplified HTTP request client 'request'.","keywords":["xhr","http","https","promise","request","then","thenable","core"],"main":"./lib/plumbing.js","scripts":{"test":"gulp ci","test-publish":"gulp ci-no-cov","publish-please":"publish-please","prepublish":"publish-please guard"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"author":{"name":"Nicolai Kamenzky","url":"https://github.com/analog-nico"},"license":"ISC","bugs":{"url":"https://github.com/request/promise-core/issues"},"homepage":"https://github.com/request/promise-core#readme","engines":{"node":">=0.10.0"},"dependencies":{"lodash":"^4.13.1"},"peerDependencies":{"request":"^2.34"},"devDependencies":{"@request/api":"^0.6.0","@request/client":"^0.1.0","bluebird":"~3.4.1","body-parser":"~1.15.2","chai":"~3.5.0","chalk":"~1.1.3","gulp":"~3.9.1","gulp-coveralls":"~0.1.4","gulp-eslint":"~2.1.0","gulp-istanbul":"~1.0.0","gulp-mocha":"~2.2.0","node-version":"~1.0.0","publish-please":"~2.1.4","request":"^2.34.0","rimraf":"~2.5.3","run-sequence":"~1.2.2","stealthy-require":"~1.0.0"},"gitHead":"c377e5c6f8c7da680dcfd57c0fc534930c2c02e8","_id":"@request/promise-core@1.1.0","_shasum":"d47d3012ba40ef2b8c2a16b95b1ad3ff9b102538","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"analog-nico","email":"nicolai.kamenzky@testrails.org"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"dist":{"shasum":"d47d3012ba40ef2b8c2a16b95b1ad3ff9b102538","size":5566,"noattachment":false,"key":"/@request/promise-core/-/@request/promise-core-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@request/promise-core/download/@request/promise-core-1.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-core-1.1.0.tgz_1469916089157_0.2692258295137435"},"directories":{},"publish_time":1469916089381,"_cnpm_publish_time":1469916089381,"deprecated":"This package got renamed. Please install request-promise-core instead.","_hasShrinkwrap":false},"1.0.0":{"name":"@request/promise-core","version":"1.0.0","description":"Core Promise support implementation for the simplified HTTP request client 'request'.","keywords":["xhr","http","https","promise","request","then","thenable","core"],"main":"./lib/plumbing.js","scripts":{"test":"gulp ci","test-publish":"gulp ci-no-cov","publish-please":"publish-please","prepublish":"publish-please guard"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"author":{"name":"Nicolai Kamenzky","url":"https://github.com/analog-nico"},"license":"ISC","bugs":{"url":"https://github.com/request/promise-core/issues"},"homepage":"https://github.com/request/promise-core#readme","engines":{"node":">=0.10.0"},"dependencies":{"lodash":"^4.13.1"},"peerDependencies":{"request":"^2.34"},"devDependencies":{"@request/api":"^0.6.0","@request/client":"^0.1.0","bluebird":"~3.4.1","body-parser":"~1.15.2","chai":"~3.5.0","chalk":"~1.1.3","gulp":"~3.9.1","gulp-coveralls":"~0.1.4","gulp-eslint":"~2.1.0","gulp-istanbul":"~1.0.0","gulp-mocha":"~2.2.0","node-version":"~1.0.0","publish-please":"~2.1.4","request":"^2.34.0","rimraf":"~2.5.3","run-sequence":"~1.2.2","stealthy-require":"~0.1.0"},"gitHead":"49871bf927afe0524ce5ea907b5b7ab502cb6749","_id":"@request/promise-core@1.0.0","_shasum":"e2f90d73a83276e03b1dc706f585eaced11e67e1","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"analog-nico","email":"nicolai.kamenzky@testrails.org"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"dist":{"shasum":"e2f90d73a83276e03b1dc706f585eaced11e67e1","size":5309,"noattachment":false,"key":"/@request/promise-core/-/@request/promise-core-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@request/promise-core/download/@request/promise-core-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-core-1.0.0.tgz_1468621859751_0.2830412876792252"},"directories":{},"publish_time":1468621859959,"_cnpm_publish_time":1468621859959,"deprecated":"This package got renamed. Please install request-promise-core instead.","_hasShrinkwrap":false},"1.0.0-rc.1":{"name":"@request/promise-core","version":"1.0.0-rc.1","description":"Core Promise support implementation for the simplified HTTP request client 'request'.","keywords":["xhr","http","https","promise","request","then","thenable","core"],"main":"./lib/plumbing.js","scripts":{"test":"gulp ci","test-publish":"gulp ci-no-cov","publish-please":"publish-please","prepublish":"publish-please guard"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"author":{"name":"Nicolai Kamenzky","url":"https://github.com/analog-nico"},"license":"ISC","bugs":{"url":"https://github.com/request/promise-core/issues"},"homepage":"https://github.com/request/promise-core#readme","engines":{"node":">=0.10.0"},"dependencies":{"lodash":"^4.13.1"},"peerDependencies":{"request":"^2.34"},"devDependencies":{"@request/api":"^0.6.0","@request/client":"^0.1.0","bluebird":"~3.4.1","body-parser":"~1.15.2","chai":"~3.5.0","chalk":"~1.1.3","gulp":"~3.9.1","gulp-coveralls":"~0.1.4","gulp-eslint":"~2.1.0","gulp-istanbul":"~1.0.0","gulp-mocha":"~2.2.0","node-version":"~1.0.0","publish-please":"~2.1.4","request":"^2.34.0","rimraf":"~2.5.3","run-sequence":"~1.2.2","stealthy-require":"~0.1.0"},"gitHead":"9e0068004e64ac1f4eea537785b4ad1ad09d2b30","_id":"@request/promise-core@1.0.0-rc.1","_shasum":"31b0eeeac097bc6ca369aad4bdfad757f930c1b7","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"analog-nico","email":"nicolai.kamenzky@testrails.org"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"dist":{"shasum":"31b0eeeac097bc6ca369aad4bdfad757f930c1b7","size":5403,"noattachment":false,"key":"/@request/promise-core/-/@request/promise-core-1.0.0-rc.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@request/promise-core/download/@request/promise-core-1.0.0-rc.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/promise-core-1.0.0-rc.1.tgz_1468198021009_0.5639392992015928"},"directories":{},"publish_time":1468198023512,"_cnpm_publish_time":1468198023512,"_hasShrinkwrap":false},"0.0.1":{"name":"@request/promise-core","version":"0.0.1","description":"Core Promise support implementation for the simplified HTTP request client 'request'.","keywords":["xhr","http","https","promise","request","then","thenable","native"],"main":"./lib/rp.js","scripts":{"test":"gulp ci"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"author":{"name":"Nicolai Kamenzky","url":"https://github.com/analog-nico"},"license":"ISC","bugs":{"url":"https://github.com/request/promise-core/issues"},"homepage":"https://github.com/request/promise-core#readme","engines":{"node":">=0.10.0"},"gitHead":"07b982ad397706fc04676a849cbd750ae7cf55b1","_id":"@request/promise-core@0.0.1","_shasum":"a8751f81589bc23caa874e9bee1df838b9aac51a","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.1.0","_npmUser":{"name":"analog-nico","email":"nicolai.kamenzky@testrails.org"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"dist":{"shasum":"a8751f81589bc23caa874e9bee1df838b9aac51a","size":1305,"noattachment":false,"key":"/@request/promise-core/-/@request/promise-core-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@request/promise-core/download/@request/promise-core-0.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-core-0.0.1.tgz_1462604848763_0.14493800746276975"},"directories":{},"publish_time":1462604849179,"_cnpm_publish_time":1462604849179,"deprecated":"This package got renamed. Please install request-promise-core instead.","_hasShrinkwrap":false},"0.0.0":{"name":"@request/promise-core","version":"0.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/request/promise-core.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/request/promise-core/issues"},"homepage":"https://github.com/request/promise-core#readme","gitHead":"be7b9e1ff431e361620c72731ad1f35dd0234a4c","_id":"@request/promise-core@0.0.0","_shasum":"05a1c67242bdf5e39ab011d9af167c57ff09a56f","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.0.0","_npmUser":{"name":"request","email":"request@outofindex.com"},"dist":{"shasum":"05a1c67242bdf5e39ab011d9af167c57ff09a56f","size":331,"noattachment":false,"key":"/@request/promise-core/-/@request/promise-core-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@request/promise-core/download/@request/promise-core-0.0.0.tgz"},"maintainers":[{"name":"request","email":"request@outofindex.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/promise-core-0.0.0.tgz_1462568762756_0.981943613383919"},"directories":{},"publish_time":1462568764406,"_cnpm_publish_time":1462568764406,"deprecated":"This package got renamed. Please install request-promise-core instead.","_hasShrinkwrap":false}},"readme":"<a href=\"http://promisesaplus.com/\">\n    <img src=\"https://promises-aplus.github.io/promises-spec/assets/logo-small.png\" align=\"right\" alt=\"Promises/A+ logo\" />\n</a>\n\n# @request/promise-core\n\n[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request-promise?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://img.shields.io/travis/request/promise-core/master.svg?style=flat-square)](https://travis-ci.org/request/promise-core)\n[![Coverage Status](https://img.shields.io/coveralls/request/promise-core.svg?style=flat-square)](https://coveralls.io/r/request/promise-core)\n[![Dependency Status](https://img.shields.io/gemnasium/request/promise-core.svg?style=flat-square)](https://gemnasium.com/github.com/request/promise-core)\n[![Known Vulnerabilities](https://snyk.io/test/npm/promise-core/badge.svg?style=flat-square)](https://snyk.io/test/npm/promise-core)\n\n\nThis package is the core for the following packages:\n\n- [`request-promise`](https://github.com/request/request-promise)\n- [`request-promise-any`](https://github.com/request/request-promise-any)\n- [`request-promise-bluebird`](https://github.com/request/request-promise-bluebird)\n- [`request-promise-native`](https://github.com/request/request-promise-native)\n\n`@request/promise-core` contains the core logic to add Promise support to [`request`](https://github.com/request/request).\n\nPlease use one of the libraries above. It is only recommended to use this library directly, if you have very specific requirements.\n\n## Installation for `request@^2.34`\n\nThis module is installed via npm:\n\n```\nnpm install --save request\nnpm install --save @request/promise-core\n```\n\n`request` is defined as a peer-dependency and thus has to be installed separately.\n\n## Usage for `request@^2.34`\n\n``` js\n// 1. Load the request library\n\n// Only use a direct require if you are 100% sure that:\n// - Your project does not use request directly. That is without the Promise capabilities by calling require('request').\n// - Any of the installed libraries use request.\n// ...because Request's prototype will be patched in step 2.\n/* var request = require('request'); */\n\n// Instead use:\nvar stealthyRequire = require('stealthy-require');\nvar request = stealthyRequire(require.cache, function () {\n    return require('request');\n});\n\n\n// 2. Add Promise support to request\n\nvar configure = require('@request/promise-core/configure/request2');\n\nconfigure({\n    request: request,\n\t// Pass your favorite ES6-compatible promise implementation\n    PromiseImpl: Promise,\n\t// Expose all methods of the promise instance you want to call on the request(...) call\n    expose: [\n        'then',   // Allows to use request(...).then(...)\n        'catch',  // Allows to use request(...).catch(...)\n        'promise' // Allows to use request(...).promise() which returns the promise instance\n    ],\n    // Optional: Pass a callback that is called within the Promise constructor\n    constructorMixin: function (resolve, reject) {\n        // `this` is the request object\n        // Additional arguments may be passed depending on the PromiseImpl used\n    }\n});\n\n\n// 3. Use request with its promise capabilities\n\n// E.g. crawl a web page:\nrequest('http://www.google.com')\n    .then(function (htmlString) {\n        // Process html...\n    })\n    .catch(function (err) {\n        // Crawling failed...\n    });\n```\n\n## Installation and Usage for `request@next`\n\n[Request Next](https://github.com/request/request/issues/1982) is still in alpha. However, `@request/promise-core` is already designed to be compatible and ships with a configuration helper – `require('@request/promise-core/configure/request-next')` – that is [used by `request-promise`](https://github.com/request/request-promise/blob/next/lib/rp.js) in its \"next\" branch.\n\n## Contributing\n\nTo set up your development environment:\n\n1. clone the repo to your desktop,\n2. in the shell `cd` to the main folder,\n3. hit `npm install`,\n4. hit `npm install gulp -g` if you haven't installed gulp globally yet, and\n5. run `gulp dev`. (Or run `node ./node_modules/.bin/gulp dev` if you don't want to install gulp globally.)\n\n`gulp dev` watches all source files and if you save some changes it will lint the code and execute all tests. The test coverage report can be viewed from `./coverage/lcov-report/index.html`.\n\nIf you want to debug a test you should use `gulp test-without-coverage` to run all tests without obscuring the code by the test coverage instrumentation.\n\n## Change History\n\n- 1.1.0 (2016-07-30)\n    - Added `constructorMixin` option to enable [request/request-promise#123](https://github.com/request/request-promise/pull/123)\n- 1.0.0 (2016-07-15)\n    - All tests green, ready for prime time\n- 1.0.0-rc.1 (2016-07-10)\n    - Reimplementation of core logic based on `request-promise@3.0.0`\n    - Plus `transform2xxOnly` option (fixes [request/request-promise#131](https://github.com/request/request-promise/issues/131))\n\n## License (ISC)\n\nIn case you never heard about the [ISC license](http://en.wikipedia.org/wiki/ISC_license) it is functionally equivalent to the MIT license.\n\nSee the [LICENSE file](LICENSE) for details.","_attachments":{},"homepage":"https://github.com/request/promise-core#readme","bugs":{"url":"https://github.com/request/promise-core/issues"},"license":"ISC"}