tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

html_header-test-page.html (1157B)


      1 <!-- Any copyright is dedicated to the Public Domain.
      2     http://creativecommons.org/publicdomain/zero/1.0/ -->
      3 <!doctype html>
      4 
      5 <html>
      6  <head>
      7    <meta charset="utf-8"/>
      8    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
      9    <meta http-equiv="Pragma" content="no-cache" />
     10    <meta http-equiv="Expires" content="0" />
     11    <title>Network Monitor test page</title>
     12  </head>
     13 
     14  <body>
     15    <p>POST raw test</p>
     16 
     17    <script type="text/javascript">
     18      /* exported performRequests */
     19      "use strict";
     20 
     21      function post(address, message, callback) {
     22        const xhr = new XMLHttpRequest();
     23        xhr.open("POST", address, true);
     24        xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded");
     25 
     26        xhr.onreadystatechange = function() {
     27          if (this.readyState == this.DONE) {
     28            callback();
     29          }
     30        };
     31        xhr.send(message);
     32      }
     33 
     34      function performRequests() {
     35        const rawData = "";
     36        post("sjs_simple-test-server.sjs?file=foo+%23+bar#home", rawData, function() {
     37          // Done.
     38        });
     39      }
     40    </script>
     41  </body>
     42 
     43 </html>