requests-tests.js revision 0a7df5b558190d35dd32d49c8ccdb9dadc7d0529
name: 'HTTP GET',
'testGET': function() {
var t = this;
this.handler = function() {
};
}
}
});
this.wait(null, 1000);
},
'testGETWithData': function() {
var t = this, cb;
this.handler = function() {
};
cb = {
t.response = o.responseText;
}
}
};
this.wait(null, 1000);
}
}));
name: 'HTTP DELETE',
'testDELETEWithData': function() {
var t = this, cb;
this.handler = function() {
};
cb = {
method: 'DELETE',
t.response = o.responseText;
}
}
};
this.wait(null, 1000);
}
}));
name: 'HTTP HEAD',
'testHEAD': function() {
var t = this;
this.handler = function() {
if (t.headers) {
// IE, Safari, Opera all return HTTP response headers
}
else {
// Firefox 3 does not return anything except an HTTP
// status of 0.
}
};
method: 'HEAD',
t.headers = o.getAllResponseHeaders();
}
}
});
this.wait(null, 1000);
}
}));
// This test fails in Opera.
name: 'HTTP OPTIONS',
'testOPTIONS': function() {
var t = this;
this.handler = function() {
if (t.headers) {
}
};
method: 'OPTIONS',
t.headers = o.getAllResponseHeaders();
}
}
});
this.wait(null, 1000);
}
}));
name: "HTTP POST",
'testPOST': function() {
var t = this;
this.handler = function() {
};
method: 'POST',
data: 'hello=world&foo=bar',
t.response = o.responseText;
}
}
});
this.wait(null, 1000);
},
'testPOSTWithNoData': function() {
var t = this;
this.handler = function() {
};
method: 'POST',
t.response =+ o.responseText;
}
}
});
this.wait(null, 1000);
}
}));
});