lib/middleware.js
function bodySetter(req, res, next) {
  if (req._post_body) {
    return next();
  }

  req.post_body = req.post_body || '';

  if ('POST' !== req.method) {
    return next();
  }

  req._post_body = true;

  req.on('data', function (chunk) {
    req.post_body += chunk;
  });

  next();
}
function bodySetter(req, res, next) {
  if (req._post_body) {
    return next();
  }

  req.post_body = req.post_body || '';

  if ('POST' !== req.method) {
    return next();
  }

  req._post_body = true;

  req.on('data', function (chunk) {
    req.post_body += chunk;
  });

  next();
}
function bodySetter ( req , res , next ) { if ( req . _post_body ) { return next ( ) ; } req . post_body = req . post_body || '' ; if ( 'POST' !== req . method ) { return next ( ) ; } req . _post_body = true ; req . on ( 'data' , function ( chunk ) { req . post_body += chunk ; } ) ; next ( ) ; }
Custom middleware to save unparsed request body to req.content
Custom middleware to save unparsed request body to req . content