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
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html dir="ltr" xml:lang="en-US" lang="en-US"> |
michael@0 | 3 | <head> |
michael@0 | 4 | <meta charset="utf-8"> |
michael@0 | 5 | <title>Console HTTP test page</title> |
michael@0 | 6 | <script type="text/javascript"><!-- |
michael@0 | 7 | function makeXhr(aMethod, aUrl, aRequestBody, aCallback) { |
michael@0 | 8 | var xmlhttp = new XMLHttpRequest(); |
michael@0 | 9 | xmlhttp.open(aMethod, aUrl, true); |
michael@0 | 10 | xmlhttp.onreadystatechange = function() { |
michael@0 | 11 | if (aCallback && xmlhttp.readyState == 4) { |
michael@0 | 12 | aCallback(); |
michael@0 | 13 | } |
michael@0 | 14 | }; |
michael@0 | 15 | xmlhttp.send(aRequestBody); |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | function testXhrGet(aCallback) { |
michael@0 | 19 | makeXhr('get', 'test-data.json', null, aCallback); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | function testXhrPost(aCallback) { |
michael@0 | 23 | makeXhr('post', 'test-data.json', "Hello world!", aCallback); |
michael@0 | 24 | } |
michael@0 | 25 | // --></script> |
michael@0 | 26 | </head> |
michael@0 | 27 | <body> |
michael@0 | 28 | <h1>Heads Up Display HTTP Logging Testpage</h1> |
michael@0 | 29 | <h2>This page is used to test the HTTP logging.</h2> |
michael@0 | 30 | |
michael@0 | 31 | <form action="http://example.com/browser/browser/devtools/webconsole/test/test-network-request.html" method="post"> |
michael@0 | 32 | <input name="name" type="text" value="foo bar"><br> |
michael@0 | 33 | <input name="age" type="text" value="144"><br> |
michael@0 | 34 | </form> |
michael@0 | 35 | </body> |
michael@0 | 36 | </html> |