-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (38 loc) · 1.34 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<html>
<head>
<title>Test Operator Api</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var user,pass, v;
var request = new XMLHttpRequest()
request.onreadystatechange = function() {
if (request.readyState == XMLHttpRequest.DONE) {
alert(request.responseText);
}
}
$("#submit").click(function(){
user=$("#user").val();
request.open('POST', 'http://localhost:8546/getAccountBalance', true)
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
request.send(JSON.stringify({user: user}))
});
$("#submitIds").click(function(){
v=$("#ids").val();
request.open('POST', 'http://localhost:8546/getInclusionProof', true)
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
request.send(JSON.stringify({value: v}))
});
});
</script>
</head>
<body>
<h1>Query Account</h1>
<input type="TEXT" id="user" size="40"><br>
<input type="button" id="submit" value="Submit">
<br/>
<h1>Get inclusion proof</h1>
<input type="TEXT" id="ids" size="40"><br>
<input type="button" id="submitIds" value="Submit">
</body>
</html>