<h1>You are visitor:</h1>
<div id="counter">
<script>
fetch('api_gateway_url')
.then(res => res.json())
.then(res => {document.getElementById("counter").innerHTML = res.body.count})
.then(data => console.log(data));
</script>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
I am not sure if this is right channel for this question. I apologize. I included the javascript above in my resume html ( At first, I didn't know where to include the script in my html but I later figured it out) but the counts is not showing on my resume page. I pasted and tested the api gateway url in my web browser, I get a response ({"headers": {"Access-Control-Allow-Origin": "*"}, "statusCode": 200, "body": "26"}). I have been on this for some days. At this juncture, i don't know what to do. Please help!! Thanks.