How to return the data requested by https.request in nodejs to the front end?

clipboard.png
use the third-party SMS platform, use the request of https.request, and the returned data is in resq.on. I want to return the data returned by the third party directly to the front end, and then the front end uses the content returned by the third-party platform to judge, but the data can"t be returned all the time. Please take a look at it and kneel down.

Mar.22,2021
The

problem has been solved. Add a callback function to post, and then you can return


. At this time, node is actually equivalent to a proxy. It first receives the request (req1, res1) from the browser, and then establishes a connection request (req2) with the third-party SMS platform. The data obtained through req2 needs to be sent to the front-end browser using res1.write.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d1c6-2c376.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d1c6-2c376.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?