Created
October 7, 2010 05:11
-
-
Save chapel/614586 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 httpAgent = require('http-agent'), | |
sys = require('sys'); | |
var agent = httpAgent.create('http://www.bungie.net/stats/reach/playergamehistory.aspx?player=thechapel&vc=2'); | |
agent.addListener('next', function (err, agent) { | |
sys.puts('Body of the current page: ' + agent.body); | |
sys.puts('Response we saw for this page: ' + agent.response); | |
// Go to the next page in the sequence | |
agent.next(); | |
}); | |
agent.addListener('stop', function (err, agent) { | |
sys.puts('the agent has stopped'); | |
}); | |
agent.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment