Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/franciscop/request-promises
A wrapper for "request" with Promises support
https://github.com/franciscop/request-promises
Last synced: 14 days ago
JSON representation
A wrapper for "request" with Promises support
- Host: GitHub
- URL: https://github.com/franciscop/request-promises
- Owner: franciscop
- Created: 2017-03-14T06:06:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T18:10:14.000Z (over 7 years ago)
- Last Synced: 2024-10-09T19:07:54.854Z (about 1 month ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Request promises
Just a wrapper for [request](https://github.com/request/request) with proper promises. Because `request-promise` defaults doesn't make sense. Just use it:
```js
const request = require('request-promises');request('https://google.com/')
.then(res => { ... })
.catch(err => { ... });
```Or with the new Async:
```js
const request = require('request-promises');(async () => {
try {
const res = await request('https://google.com/');
...
} catch (err) {
...
}
})();
```