Created
August 19, 2016 11:29
-
-
Save wordswords/c8741572722a00b7520a9a11d6a18495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// doesn't follow redirects | |
function HTTPRequest(url){ | |
}; | |
HTTPRequest.prototype.request = function(url){ | |
var request = require('request'); | |
return result = request(url, function (error, response, body){ | |
if (!error) { | |
return body; | |
} | |
}); | |
}; | |
module.exports = HTTPRequest; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment