Wikia/mercury — pull request #180 by aquilax (2014-09-16 11:31:13+00:00)
Title: HG-149: Added response X-Response-Time header to responses

This PR adds `X-Response-Time` header to each response. The header is used for performance measurement by the PLATFORM team.

The value is measured in milliseconds and represents the difference between the `onPreResponse` event's and `Request`'s received time stamps.

Currently the `server.ext` definition is wrong, which causes the transpiler to spit:
```
error TS2082: Supplied parameters do not match any signature of call target:
Could not apply type 'string' to argument 2 which is of type '(request: hapi.Request, next: Function) => void'.
```
Current definition for server.ext in hapi.d.ts is:
```
ext(event: any, method: string, options?: any): void;
```
and in the [documentation](http://hapijs.com/api#serverextevent-method-options) it is defined as:

```
event - the event name.
method - a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is function(request, next) where:
...
options - an optional object with the following:
```
This will be handled in a separate PR to the definitely typed repository.