Cross-Origin Read Blocking (CORB) issue in my Get Ajax request

Ali Zia picture Ali Zia · Jul 19, 2018 · Viewed 17.2k times · Source

I want to get data from a URL

https://api.binance.com/api/v1/ticker/24hr

When I hit this url in POSTMAN using Get type, i get JSON data, but when I hit it with an AJAX call, I get this issue

Failed to load https://api.binance.com/api/v1/ticker/24hr: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.binance.com/api/v1/ticker/24hr with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

This is my code

$.get( "https://api.binance.com/api/v1/ticker/24hr", function( data ) {
  console.log(data);
});

If need be, I can also change my $.get to $.ajax. That won't be an issue.

Answer