Friday 14 April 2017

Responsibilities of res.send() function in express?

In my project I am attaching some parameters to the req object to pass some data from one middleware to next and sometimes between functions. I was looking at the code of res.send using a debuggger, and in it there is a line where it attaches the req object of the call to res.req, something like this

res.req = this.req;

After that what the function res.send does is unclear, but my question is does the client making the request gets the modified req object when I attached some values to it in my middlewares.



via Piyush Dhore

No comments:

Post a Comment