File: cors.html

package info (click to toggle)
node-axios 1.2.1%2Bdfsg-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,796 kB
  • sloc: javascript: 10,727; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body>

An alert should be shown with <code>{"status":"ok"}</code>

<script src="promise.js"></script>
<script src="../../dist/axios.js"></script>
<script>
    axios.get('http://cors-test.appspot.com/test').then(function(response) {
        alert(JSON.stringify(response.data));
        alert('response headers:\n\n' + JSON.stringify(response.headers));
    }, function(err) { console.log(err) });
</script>

</body>
</html>