Last active
September 5, 2015 01:08
-
-
Save enieber/d5bb4054c43a1fb17406 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
var http = require('http'); | |
var url = 'http://api.redtube.com/?data=redtube.Videos.searchVideos&search=Sasha%20Gray'; | |
function callback(data){ | |
var chunk = ''; | |
chunk += data; | |
console.log('chunk: ', chunk) | |
} | |
http.get(url, function(res) { | |
console.log("Got response: " + res.statusCode); | |
res.on('data', callback) | |
}) | |
.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