I am not getting json data in console by requesting this API : https://amlocatapi.us-south.cf.appdomain.cloud/location with using this headers { method:'GET', headers:{ 'Authorization':'1q2w3e4r5t6yu7i8', 'Content-Type':'application/json' } }
<html>
<head></head>
<body>
Hello
</body>
<script>
fetch('https://amlocatapi.us-south.cf.appdomain.cloud/location',
{
method:'GET',
headers:{
'Authorization':'1q2w3e4r5t6yu7i8',
'Content-Type':'application/json'
}
}
).then(response => response.json())
.then(json => console.log(json))
.catch(err => console.log(err));
</script>
</html>