I'm trying to fetch data from Blockchain API Here, it works only when i access the link using Chrome, but when i using jQuery .getJSON() i got this error message :
Access to XMLHttpRequest at 'https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I know this is because CORS, so i tried using CORS Plugin to solve it,but i am getting another error :
GET https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P 503
after that i tried using postmant and i got meessage :
Please turn JavaScript on and reload the page.
Here is my code
url = 'https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P'
$.getJSON(url,function(result){
console.log(result);
})