Skip to content

Commit e165ad1

Browse files
committed
Uh yeah, DELETE was actually working the whole time. The tests were wrong.
1 parent 99abd60 commit e165ad1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ the W3C spec.
3232
## Supports ##
3333

3434
* Async and synchronous requests
35-
* GET, POST, and PUT requests
35+
* GET, POST, PUT, and DELETE requests
3636
* All native methods (open, send, abort, getRequestHeader,
3737
getAllRequestHeaders)
3838
* Requests to all domains
@@ -42,5 +42,4 @@ the W3C spec.
4242
* Add basic authentication
4343
* Additional unit tests
4444
* Possibly move from http to tcp for more flexibility
45-
* DELETE requests aren't working
4645
* XML parsing

tests/test-request.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var server = http.createServer(function (req, res) {
3030

3131
// Test standard methods
3232
var methods = ["GET", "POST", "HEAD", "PUT", "DELETE"];
33+
var curMethod = 0;
3334

3435
function start(method) {
3536
// Reset each time
@@ -46,6 +47,7 @@ function start(method) {
4647
curMethod++;
4748

4849
if (curMethod < methods.length) {
50+
sys.puts("Testing " + methods[curMethod]);
4951
start(methods[curMethod]);
5052
}
5153
}
@@ -56,7 +58,5 @@ function start(method) {
5658
xhr.send();
5759
}
5860

59-
for (var curMethod in methods) {
60-
sys.puts("Testing " + methods[curMethod]);
61-
start(methods[curMethod]);
62-
}
61+
sys.puts("Testing " + methods[curMethod]);
62+
start(methods[curMethod]);

0 commit comments

Comments
 (0)