New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bizzby-on-response

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bizzby-on-response

Call back when an [express](https://github.com/visionmedia/express) request is finished.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

on-response

Call back when an express request is finished.

Example

var onResponse = require('bizzby-on-response');

app.use(function (req, res, next) {
  var start = Date.now();
  onResponse(req, res, function (err) {
    var duration = Date.now() - start;
    console.log('request duration: ' + duration);
  });
  next();
});

The callback function returns a request and response summary for logging purposes:

var onResponse = require('bizzby-on-response');

app.use(function (req, res, next) {
  onResponse(req, res, function (err, summary) {
    console.log('request size: ' + summary.request.size);
    console.log('response size: ' + summary.response.size);
  });
  next();
});

API

onResponse(req, res, callback)

Call back when the request is finished.

License

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

FAQs

Package last updated on 18 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc