You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I request a response from other server via my node server, I do this:
app.use(function (req, res) {
req.pipe(request(url)).pipe(res).
})
But I use request-debug, find that no req.body to the other server, causing much trouble.
Can you tell me how to result it.
Thanks.
The text was updated successfully, but these errors were encountered:
Thank you, I found the solution:
express default use 'app.use(body-parser('json'))', which means server get req and parser req.body to json. But pipe need stream to do. so change it to 'app.use(body-parser(raw()))'. raw() parser req.body to stream.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
when I request a response from other server via my node server, I do this:
app.use(function (req, res) {
req.pipe(request(url)).pipe(res).
})
But I use request-debug, find that no req.body to the other server, causing much trouble.
Can you tell me how to result it.
Thanks.
The text was updated successfully, but these errors were encountered: