Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!-- Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ -->
3 <!doctype html>
5 <html>
6 <head>
7 <meta charset="utf-8"/>
8 <title>Network Monitor test page</title>
9 </head>
11 <body>
12 <p>POST raw test</p>
14 <script type="text/javascript">
15 function post(aAddress, aMessage, aCallback) {
16 var xhr = new XMLHttpRequest();
17 xhr.open("POST", aAddress, true);
18 xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded");
20 xhr.onreadystatechange = function() {
21 if (this.readyState == this.DONE) {
22 aCallback();
23 }
24 };
25 xhr.send(aMessage);
26 }
28 function performRequests() {
29 var rawData = "foo=bar&baz=123";
30 post("sjs_simple-test-server.sjs", rawData, function() {
31 // Done.
32 });
33 }
34 </script>
35 </body>
37 </html>