I need to receive some APIS values.
For example: calls to api1()
and api2()
return deferred.promise
;
I can:
api1().then( function(res1){
api2().then( function(res2){
console.log(res1, res2);
})
});
How can I improve these calls to apis using Q promises?
I tried to use something like: Q.fcall(api1()).then(api2())
...