Skip to content

Instantly share code, notes, and snippets.

@jmarmolejos
Created February 26, 2016 17:27
Show Gist options
  • Select an option

  • Save jmarmolejos/d20b18f15fc9483be24b to your computer and use it in GitHub Desktop.

Select an option

Save jmarmolejos/d20b18f15fc9483be24b to your computer and use it in GitHub Desktop.
var http = require('http');
var httpRequest = {
get: url => {
return (new Promise(function(resolve, reject) {
http.get(url, res => {
resolve(res);
});
}));
}
};
module.exports = httpRequest;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment