tonis/response-time

Middleware to add respones time to response headers.


License
BSD-3-Clause

Documentation

Scrutinizer Code Quality Code Coverage Build Status

Tonis\ResponseTime

Tonis\ResponseTime is simple middleware that adds a X-Response-Time header to responses.

Composer

composer require tonis-io/response-time

Usage

$responseTime = new \Tonis\ResponseTime;

// add $responseTime to your middleware queue

Configuration

Tonis\ResponseTime optionally takes an array of options.

  • digits: the number of digits to have in the response (default: 3)
  • header: the header to use (default: X-Response-Time)
  • suffix: include suffix output (default: true)