o

org.http4s.server.middleware

ResponseTiming

object ResponseTiming

Source
ResponseTiming.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ResponseTiming
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply[F[_]](http: HttpApp[F], timeUnit: TimeUnit = MILLISECONDS, headerName: CIString = ci"X-Response-Time")(implicit F: Sync[F], clock: Clock[F]): HttpApp[F]

    Simple middleware for adding a custom header with timing information to a response.

    Simple middleware for adding a custom header with timing information to a response.

    This middleware captures the time starting from when the request headers are parsed and supplied to the wrapped service and ending when the response is started. Metrics middleware, like this one, work best as the outer layer to ensure work done by other middleware is also included.

    http

    HttpApp to transform

    timeUnit

    the units of measure for this timing

    headerName

    the name to use for the header containing the timing info