request / request-promise

The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
ISC License
4.77k stars 297 forks source link

cant return the chained promises result... #331

Closed Khodesaeed closed 4 years ago

Khodesaeed commented 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

Khodesaeed commented 4 years ago

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