Cloud Functions httpRequest


I tried to use Cloud Functions to get match information from an API. But it is not working

Moralis.Cloud.define("LiveAPI", async (request) => {
  let url = 'MY-URL';
	Moralis.Cloud.httpRequest({url,headers:{'Content-Type': 'application/json;charset=utf-8'})
                               .then(resp=>return resp,err=>return err);

How can I solve this prblem?

it should be some syntax error there in cloud code, you get that error when cloud code doesn’t work