Closed Suvin1987 closed 5 years ago
function main(param) {
return sequence.test1(param)
.then(function (pairingInfo) {
return sequence.test2(pairingInfo)
})
}
...should do the trick. Btw, if you want to understand why then read about the .then(...)
function for promises in general.
Hello,
I want to pass the response received from one API as a request parameter in another API using Request-Promise NodeJs module. Can someone pls help me in this? I am giving a brief of the sample code below:
var Sequence = {
test2 : function (param) {
function main(param) { return sequence.test1(param).then(sequence.test2(param)) }