| <!doctype html> |
| <html> |
| <head> |
| <title>XMLHttpRequest: send() - non-empty data argument and GET/HEAD</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="/following::OL[1]/LI[3]" /> |
| |
| </head> |
| <body> |
| <div id="log"></div> |
| <script> |
| function request(method) { |
| test(function() { |
| var client = new XMLHttpRequest() |
| client.open(method, "resources/content.php", false) |
| client.send("TEST") |
| assert_equals(client.getResponseHeader("x-request-content-length"), "NO") |
| assert_equals(client.getResponseHeader("x-request-method"), method) |
| assert_equals(client.responseText, "") |
| }, document.title + " (" + method + ")") |
| } |
| request("GET") |
| request("HEAD") |
| </script> |
| </body> |
| </html> |