Wednesday 9 December 2015

Node Steam and HTTP Response

Hello All! I am very very new to streams and even fairly new to node. But i need help with some streams. I am working on a project that uses expressjs and the requestjs lib. I would like to do some translating dto type stuff to send my own scheme to my clients. So I am making a request and wanted to pass the stream to a function of my own and edit the data, then send the writable steam in the response OR create a readable steam with the new data and pipe that to the response.request('url').pipe(myFn).pipe(res); orrequest('url').pipe(myFn) res.send() But I am not sure where my data goes? How to send it to the response? Or even how to really edit the data in a stream then pass it along? Am i using streams wrong? Should i be doing something else?And info will be great!Thanks

Submitted December 09, 2015 at 03:47PM by dignmg

No comments:

Post a Comment