2013-08-14 20:45:33 -07:00
|
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
2013-06-12 00:37:46 -07:00
|
|
|
<!doctype html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8"/>
|
|
|
|
<title>Network Monitor test page</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<p>POST raw test</p>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function post(aAddress, aMessage, aCallback) {
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.open("POST", aAddress, true);
|
|
|
|
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if (this.readyState == this.DONE) {
|
|
|
|
aCallback();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
xhr.send(aMessage);
|
|
|
|
}
|
|
|
|
|
2013-06-26 13:35:39 -07:00
|
|
|
function performRequests() {
|
2013-06-12 00:37:46 -07:00
|
|
|
var rawData = "Content-Type: application/x-www-form-urlencoded\r\n\r\nfoo=bar&baz=123";
|
|
|
|
post("sjs_simple-test-server.sjs", rawData, function() {
|
|
|
|
// Done.
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|