.. | ||
lib | ||
.npmignore | ||
errors.js | ||
LICENSE | ||
package.json | ||
README.md |
Request-Promise-Native
This package is similar to request-promise
but uses native ES6 promises.
Please refer to the request-promise
documentation. Everything applies to request-promise-native
except the following:
- Instead of using Bluebird promises this library uses native ES6 promises.
- Mind that native ES6 promises have fewer features than Bluebird promises do. In particular, the
.finally(...)
method is not available.
Installation
This module is installed via npm:
npm install --save request
npm install --save request-promise-native
request
is defined as a peer-dependency and thus has to be installed separately.
Migration from request-promise
to request-promise-native
- Go through the migration instructions to upgrade to
request-promise
v4. - Ensure that you don't use Bluebird-specific features on the promise returned by your request calls. In particular, you can't use
.finally(...)
anymore. - You are done.
Contributing
To set up your development environment:
- clone the repo to your desktop,
- in the shell
cd
to the main folder, - hit
npm install
, - hit
npm install gulp -g
if you haven't installed gulp globally yet, and - run
gulp dev
. (Or runnode ./node_modules/.bin/gulp dev
if you don't want to install gulp globally.)
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
.
If 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.
Change History
- v1.0.7 (2019-02-14)
- Corrected mistakenly set
tough-cookie
version, now^2.3.3
(Thanks to @evocateur for pointing this out.) - If you installed
request-promise-native@1.0.6
please make sure after the upgrade thatrequest
andrequest-promise-native
use the same physical copy oftough-cookie
.
- Corrected mistakenly set
- v1.0.6 (2019-02-14)
- Using stricter
tough-cookie@~2.3.3
to avoid installingtough-cookie@3
which introduces breaking changes (Thanks to @jasonmit for pull request #33) - Security fix: bumped
lodash
to^4.17.11
, see vulnerabilty reports
- Using stricter
- v1.0.5 (2017-09-22)
- Upgraded
tough-cookie
to a version without regex DoS vulnerability (Thanks to @sophieklm for pull request #13)
- Upgraded
- v1.0.4 (2017-05-07)
- Fix that allows to use
tough-cookie
for cookie creation
- Fix that allows to use
- v1.0.3 (2016-08-08)
- v1.0.2 (2016-07-18)
- Fix for using with module bundlers like Webpack and Browserify
- v1.0.1 (2016-07-17)
- Fixed
@request/promise-core
version for safer versioning
- Fixed
- v1.0.0 (2016-07-15)
- Initial version similar to
request-promise
v4
- Initial version similar to
License (ISC)
In case you never heard about the ISC license it is functionally equivalent to the MIT license.
See the LICENSE file for details.