Skip to content

Instantly share code, notes, and snippets.

@henryoswald
Created July 14, 2013 15:45
Show Gist options
  • Save henryoswald/5994674 to your computer and use it in GitHub Desktop.
Save henryoswald/5994674 to your computer and use it in GitHub Desktop.
request = require("request")
module.exports = {
getUserDetails: function(user_id, callback){
var url = "http://www.api.com/user/" + user_id
request.get(url, function(err, response, body){
callback(err, body)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment