Mercurial > hg > nodescore
view node_modules/xmlhttprequest/example/demo.js @ 99:9641c2572988
osc modifications for operation integratus performance
author | Rob Canning <rob@foo.net> |
---|---|
date | Mon, 08 Dec 2014 21:30:23 +0000 |
parents | cd921abc8887 |
children |
line wrap: on
line source
var sys = require('util'); var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { sys.puts("State: " + this.readyState); if (this.readyState == 4) { sys.puts("Complete.\nBody length: " + this.responseText.length); sys.puts("Body:\n" + this.responseText); } }; xhr.open("GET", "http://driverdan.com"); xhr.send();