Closed Khodesaeed closed 4 years ago
const request = require('request-promise')
required this module and use it in this way the data and subData is options that i defined before...
const foo= (data, subData) => { return request(data) .then(result => { console.log('result:',result) return request(subData) }) }
the problem is the request(data) result is not return but the request(subData) result is return
Q.allSettled([ foo(), fo() f(), . . . ])
and with q module create an array of promises, but i still cant get my expected return result
sorry i figured it out how... for who wants to know how here its the stak...w link: https://stackoverflow.com/questions/58372400/cant-return-the-chained-promises-result
const request = require('request-promise')
const foo= (data, subData) => { return request(data) .then(result => { console.log('result:',result) return request(subData) }) }
Q.allSettled([ foo(), fo() f(), . . . ])