I'm trying to get data from GOAT website but I have a problem : GET request succeeds in POSTMAN and Chrome but fails with axios. ('error code: 1020'). So I guess it's because of Cloudflare but I would like to know why it works on POSTMAN and how can I do it with axios. URL :
'https://www.goat.com/web-api/v1/product_variants/buy_bar_data?productTemplateId=815559'
My code (copied from postman code snippet) :
var axios = require('axios');
var config = {
method: 'get',
url: 'https://www.goat.com/web-api/v1/product_variants/buy_bar_data?productTemplateId=815559',
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});