Skip to content

Instantly share code, notes, and snippets.

@ntanya
Created Jun 8, 2012
Embed
What would you like to do?
GET with node
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