blob: 103381745a7b84a042bbdcdff4d16c4b2ac6af2c [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3 <head>
4 <title>XMLHttpRequest: open() - case-insensitive methods test</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol/li[5]" />
8
9 </head>
10 <body>
11 <div id="log"></div>
12 <script>
13 function method(method) {
14 test(function() {
15 var client = new XMLHttpRequest()
16 client.open(method, "resources/content.py", false)
17 client.send(null)
18 assert_equals(client.getResponseHeader("x-request-method"), method.toUpperCase())
19 }, document.title + " (" + method.toUpperCase() + ")")
20 }
21 method("deLETE")
22 method("get")
23 method("heAd")
24 method("OpTIOns")
25 method("post")
26 method("Put")
27 </script>
28 </body>
29</html>