requests-tests.js revision 038c85d1f8981a1d1479152b76a7c47ff219417d
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);
}
}));
});