I'm using axios with this request code in reactJS
import axios from 'axios';
var config = {
method: 'get',
url: 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest',
// i have pro API KEY so i can't put it here :-)
headers: {
'X-CMC_PRO_API_KEY': 'MYAPIKEY'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
but I'll get ERR_NETWORK error
where is my problem?