public protocol RouterMiddleware
Defines the protocol which all Kitura compliant middleware must implement.
Middleware are class or struct based request handlers. They are often generic in nature and not tied to a specific request.
Handle an incoming HTTP request.
ErrorType. If an error is thrown, processing of the request is stopped, the error handlers, if any are defined, will be invoked, and the user will get a response with a status code of 500.
RouterRequestobject used to get information about the HTTP request.
RouterResponseobject used to respond to the HTTP request
The closure to invoke to enable the Router to check for other handlers or middleware to work with this request.