Created
January 20, 2010 03:07
-
-
Save kriszyp/281562 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
XMLHttpRequest = require("browser/xhr").XMLHttpRequest; | |
var request = require("jsgi-client").request; | |
var when = require("promise").when; | |
var queue = require("event-queue"); | |
when(request({ | |
method: "GET", | |
url: "http://google.com/" | |
}), function(response) { | |
print("Google responded with " + response.body); | |
queue.shutdown(); | |
}); | |
queue.enterEventLoop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment