public init(handler: @escaping RouterHandler)
The closure that is of the type
RouterHandlerto be called to handle requests
Implementation of RouterMiddleware protocol. A simple wrapper around the closure that will handle the request.
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.