Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const fetch = require('node-fetch');
function request (options, cb) {
fetch(options)
.catch(cb)
.then(res => {
return res.body()
.then(body => {
cb(null, res, body);
}, cb);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment