Works with other api's i've tried with, but doesn't work with steam for some reason.

Access to XMLHttpRequest at 'http://api.steamapis.com/market/app/730?api_key=secretKey' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

var url = 'http://api.steamapis.com/market/app/730?api_key={SecretKey}';


            var data;

            axios.get(url)

                .then(receiveData)

                .catch(handleError);
function receiveData(response) {

                // handle success
data = response.data;
                console.log(data);}
    function handleError(error) {

                // handle error

                console.log(error);
            }

0 Answers