I'm trying to make a request from inside a Parse Cloud Code function. My attempt looks likes this:
const axios = require('axios').default;
Parse.Cloud.define("loginSchool", async (request) => {
test = await axios({
method: 'get',
url: 'https://google.com'
});
return(test);
});
I can call the function via curl but it only returns Bad Gateway
as result.
I'm using Back4App with Parse Version 5.2.3.
What is the correct way to use axios inside a cloud code function for making a http request?