count-response-size-middleware

Count the content bytes in each [express](https://github.com/visionmedia/express) response.

npm install count-response-size-middleware
5 downloads in the last week
17 downloads in the last month

count-response-size-middleware

Count the content bytes in each express response.

Example

var countResponseSize = require('count-response-size-middleware');

var app = express();
app.use(countResponseSize());

app.use(function (req, res, next) {
    console.log('response is  ' + res._sent + ' bytes');
    next();
});

API

countResponseSize(options)

Generate a count response size middleware with options defaulting to:

{
    key: '_sent' // save the size as `_sent`
}

License

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|
npm loves you