-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (35 loc) · 1.15 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
42
<html>
<script>
function callapi() {
var data = JSON.stringify({
"text": document.getElementById("inputtext").value
});
var xhr = new XMLHttpRequest();
//xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
document.getElementById("apiresult").innerHTML = JSON.stringify(JSON.parse(this.responseText), undefined, 2);
}
});
xhr.open("POST", "https://phoenix-botinteraction-dev.azurewebsites.net/api/TestNLU");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
}
</script>
<head>
<h3>
Type text below and click submit to identify intent for Lease Concierge
</h3>
</head>
<body>
<div style="font-size: 25px;">
<br>
<input id="inputtext" type="text" style="width: 40%; font-size: 25px;">
<br><br><button onclick="callapi()" style="font-size: 25px;">Submit</button>
<br><br>Result -
<br>
<pre id="apiresult" style="font-size: 20px;"></pre>
</div>
</body>
</html>