Created
August 31, 2010 01:02
-
-
Save amrnt/558341 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 sys = require('sys'), | |
http = require('http'), | |
ws = require("./vendor/ws"), | |
arrays = require('./vendor/arrays'); | |
var headers = {}; | |
headers['Host'] = "search.twitter.com"; | |
var clients = []; | |
var twitter = http.createClient(80, "search.twitter.com"); | |
var request = twitter.request("GET", "/search.json?q=rails", headers); | |
request.addListener('response', function (response) { | |
response.setEncoding("utf8"); | |
response.addListener("data", function (chunk) { | |
var tweets = JSON.parse(chunk); | |
sys.puts(tweets.results); | |
}); | |
}); | |
request.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment