The following typealiases are available globally.
The definition of the closure type that is used by the
Routerclass when routing HTTP requests to closure.
RouterRequestobject that is used to work with the incoming request.
RouterResponseobject used to send responses to the HTTP request.
The closure to invoke to cause the router to inspect the path in the list of paths.
Type alias for
Before flush(i.e. before headers and body are written) lifecycle handler.
public typealias LifecycleHandler = () -> Void
Type alias for written data filter, i.e. pre-write lifecycle handler.
public typealias WrittenDataFilter = (Data) -> Data