Deprecated: Use got
directly, since it now have Promise API 🎉.
$ npm install --save got-promise
var got = require('got-promise');
got('google.com')
.then(function (res) {
console.log(res.body);
})
.catch(function (err) {
console.error(err);
console.log(err.response.body);
});
got.post('google.com'); // => Promise
Look at sindresorhus/got.
MIT © Vsevolod Strukchinsky