Commit 6fd9c2c6 authored by Johan Jatko's avatar Johan Jatko
Browse files

Update static/index.html

parent 398938f3
......@@ -6,13 +6,16 @@
<body>
<h1>This is my awesome app</h1>
<h2>Latest api request was serverd from <span id="server">NOTHING</span></h2>
<button onclick="apiii(); return false;">Click me for API request</button>
</body>
<script>
setTimeout(function() {
function apiii() {
fetch("/api/gimmesome").then(function(response) {
server = document.querySelector("#server");
server.innerHTML = response;
console.log(response)
server.innerHTML = response.text();
});
}, 2000);
}
setTimeout(apiii, 2000);
</script>
</html>
\ No newline at end of file
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment