Not sure what Iโm doing wrong currently returns nothing when should return a json string also not showing input in logs
Moralis.Cloud.define("getMeta", async (request,uri) => {
const logger = Moralis.Cloud.getLogger();
let results;
results = await Moralis.Cloud.httpRequest({
url: 'https://defi-city.com/api/city/463',
followRedirects: true,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
}).then(function(httpResponse) {
results=httpResponse.text;
logger.info("over here"+results);
logger.info(httpResponse.text);
}, function(httpResponse) {
logger.info('Request failed with response code ' + httpResponse.status);
});
logger.info("end"+results);
return await results;
});
let mData = await Moralis.Cloud.run("getMeta",uri);