PATH:
opt
/
bitninja-dispatcher
/
node_modules
/
xmlhttprequest-ssl
/
tests
var sys = require("util") , assert = require("assert") , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest , xhr; xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (this.readyState == 4) { assert.equal("Hello World", this.responseText); runSync(); } }; // Async var url = "file://" + __dirname + "/testdata.txt"; xhr.open("GET", url); xhr.send(); // Sync var runSync = function() { xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (this.readyState == 4) { assert.equal("Hello World", this.responseText); console.log("done"); } }; xhr.open("GET", url, false); xhr.send(); }
[-] test-redirect-307.js
[edit]
[+]
..
[-] test-request-protocols.js
[edit]
[-] test-request-methods.js
[edit]
[-] test-exceptions.js
[edit]
[-] test-headers.js
[edit]
[-] testdata.txt
[edit]
[-] test-redirect-303.js
[edit]
[-] test-redirect-302.js
[edit]
[-] test-events.js
[edit]
[-] test-constants.js
[edit]