Skip to content

Add support for request-received middleware #19

@niftylettuce

Description

@niftylettuce

The request-received middleware at https://github.com/cabinjs/request-received exposes a Symbol.for property, which this package could conditionally consume if interested (as opposed to just generating process.hrtime().

e.g. https://github.com/expressjs/response-time/blob/master/index.js#L53 would change from var startAt = process.hrtime() to var startAt = req[Symbol.for('request-received.startAt')] ? req[Symbol.for('request-received.startAt')] : process.hrtime()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions