MiddlewareExtension extension

An extension on the Middleware class that provides additional functionality.

on

Methods

handle(Handler handler) Handler

Available on Middleware, provided by the MiddlewareExtension extension

Chains the current middleware with a handler function and returns a new middleware handler that applies the current middleware followed by the given handler.
next(Middleware nextMiddleware) Middleware

Available on Middleware, provided by the MiddlewareExtension extension

Chains the current middleware with a nextMiddleware function and returns a new middleware handler that applies the current middleware followed by the nextMiddleware.