mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-12-26 13:05:24 +00:00
17 lines
403 B
JavaScript
17 lines
403 B
JavaScript
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();
|