-
-
Save ntanya/2898315 to your computer and use it in GitHub Desktop.
GET with node
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
app.get('/', function(req, res){ | |
var user = "twitterapi; | |
var completeResponse = ""; | |
var options = { | |
host: 'api.twitter.com', | |
port: 80, | |
path: '/1/users/show.json?screen_name=' + user | |
}; | |
var request = http.get(options, function(result) { | |
console.log("Got response: " + result.statusCode); | |
}).on('error', function(e) { | |
console.log("Got error: " + e.message); | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment