Express.js- add response body
<p>I would like to add a <code>body</code> property to Express.js' response object, which will be called every time the <code>send method is called</code>,
I do it by adding the following code as a middleware,</p>

<p>but for some reason, when I call <code>res.send</code> this function is called twice (once when body is object and in the 2nd time the same object butas a string )
1.why is it being called twice?
2.why and when is it being converted to string?</p>

<pre><code>   applicationsRouter.use(function (req, res, next) {
        var send = res.send;
        res.send = function (body) {
            res.body = body
            send.call(this, body);
        };
        next();
    });
</code></pre>