Hi,
I’ve been trying to find a solution to this and I saw there was a similar question to this already but looking at it did not solve my issue. I am not sure what I am doing wrong here as it looks like it should work. Any suggestions? Thanks in advance!
Moralis.Cloud.define("getIt", async (request) => {
const results = ""
let URL= 'https://api.coingecko.com/api/v3/coins/velas?localization=false&tickers=false&community_data=false&developer_data=false&sparkline=false'
Moralis.Cloud.httpRequest({
url: URL,
followRedirect:true
}).then(function(httpResponse) {
console.log(httpResponse.text);
results = JSON.parse(httpResponse.text)
return results
}, function(httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
});
});