-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (40 loc) · 1.14 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
40
41
<html>
<head>
<meta charset="utf-8"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.css"></link>
<script type="text/javascript">
function test_lambda(params) {
$.ajax({
url: "/lambda?" + params,
success: function(data){
alert(JSON.stringify(data));
}
});
}
function test_lambda_post(params) {
$.ajax({
method: "POST",
url: "/lambda?" + params,
success: function(data){
alert(JSON.stringify(data));
}
});
}
</script>
</head>
<body>
<h1>Sample Ajax Lambda Client</h1>
<div>
<fieldset>
<button onclick="test_lambda('path=test&foo=bar');">Test Lambda GET</button>
</fieldset>
</div>
<div>
<fieldset>
<button onclick="test_lambda_post('path=test&foo=bar');">Test Lambda POST</button>
</fieldset>
</div>
</body>
</html>