I've encountered a peculiar issue while working with axios get calls.
try {
console.log('assetAddress', assetAddress);
var options = {
method: 'GET',
url: `https://testnets-api.opensea.io/api/v1/events?only_opensea=false&limit=20&asset_contract_address=${assetAddress}`,
headers: { "Accept": 'application/json' }
};
console.log(options.url)
res = await axios.request(options);
return res.data;
} catch (e) {
//console.log(e)
}
When I include assetAddress in the url and attempt to retrieve the result, it returns undefined. However, if I manually input the actual address 0x15352F80426ec9b94412b45242d7040b5dFeB5E6, it works fine.
Any idea why this happens?