spec: Make the basic-auth spec stronger

This commit is contained in:
Cheng Zhao 2015-07-24 15:33:07 +08:00
parent 9ec60cd585
commit 1a93b1db52
3 changed files with 31 additions and 29 deletions

View file

@ -1,16 +1,21 @@
<html>
<body>
<script src='http://127.0.0.1:62342/jquery.js'></script>
<script src="../../static/jquery-2.0.3.min.js"></script>
<script type="text/javascript" charset="utf-8">
var ipc = require('ipc');
var port = location.search.substr("?port=".length);
$.ajax({
type: "GET",
url: "http://127.0.0.1:62342",
url: "http://127.0.0.1:" + port,
headers: {
"Authorization": "Basic " + btoa("test:test")
},
success: function (result){
require('ipc').send('console-message', result);
}
success: function(result) {
ipc.sendToHost(result);
},
error: function(xhr, status, error) {
ipc.sendToHost(error);
},
});
</script>
</body>