-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (26 loc) · 1.2 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
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/readable/bootstrap.min.css">
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/4.3.1/firebase.js"></script>
<!-- Moment.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<!-- Link to jQuery library -->
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous">
</script>
<script>
var queryURL = "https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2016-05-19&text=blah";
$.ajax({
url: queryURL,
username:"0c53ed5c-a1b2-4a32-8784-1a2643df6200",
password:"THnXfYPWkgC3",
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Methods": "GET,HEAD,OPTIONS,POST,PUT",
"Access-Control-Allow-Headers": "Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers"
},
method: "GET"
}).done(function(response) {
console.log(response);
console.log("hello");
});
</script>