Being new to javascript, I recently attempted to retrieve json data from bitbns but encountered the error - "(Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘’)."
I scoured the internet in search of a solution, but unfortunately came up empty-handed.
<script>
url = "https://www.bitbns.com/order/getTicker";
var request = new Request(url);
fetch(request, {mode: "cors",
}).then(function(response) {
return response.json();
}).then(function(j) {
console.log(JSON.stringify(j));
}).catch(function(error) {
console.log('Request failed', error)
});
console.log(request.headers)
</script>
Would greatly appreciate any assistance with this issue.