response-method.htm (631B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>XMLHttpRequest: influence of HTTP method on response</title> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 </head> 8 <body> 9 <div id="log"></div> 10 <script> 11 ["GET", "HEAD", "POST"].forEach(function(method) { 12 test(function() { 13 var client = new XMLHttpRequest() 14 client.open(method, "resources/echo-method.py", false) 15 client.send() 16 assert_equals(client.responseText, (method === "HEAD" ? "" : method)) 17 }, method) 18 }) 19 </script> 20 </body> 21 </html>