I am invoking multiple api calls using Promise.all and am able to receive their responses, but I want to add them to an array
my code
async function asynchUploadGrpFiles(files) {
var responseDetails = [];
await Promise.all([get('https://httpbin.org/get?a=1'),
get('https://httpbin.org/get?b=2'),
get('https://httpbin.org/get?c=3')
]).then(values => {
responseDetails.push(":::: time :::" + values);
console.log(values);
});
console.log(responseDetails.toString());
}
I am able to log the response from console.log(values);
, but these are not getting pushed in responseDetails