Namby Pamby Magicians

    superagent-response-time

    1.0.3 • Public • Published

    superagent-response-time

    A plugin for superagent that outputs a requests response time in milliseconds.

    Installation

    Install with npm:

    $ npm i superagent-response-time
    

    Usage

    import request from 'superagent';
    import responseTime from 'superagent-response-time';
     
    const callback = (req, time) => {
      console.log(time); //180.25
    }
     
    request
      .get('/some-url')
      .use(responseTime(callback)) //Add the plugin to the request
      .end(function(err, res){
        // Do something
      });

    Install

    npm i superagent-response-time

    DownloadsWeekly Downloads

    459

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • dbillinghamuk