Description Methods Methods See Also
A Middleware object represents middleware functions that have access
to the request (req), response (res) and error (err)
objects in request-response cycle via the Router.
pathReturns the path for the specified middleware.
FUNReturns the function response.
methodReturns the HTTP method for the middleware, i.e. "GET", "POST", etc.
protocolReturns the protocol, "http" or "websocket".
initialize(FUN, path, method, websocket)Initializes the state of new middleware.
new()Middleware$new(FUN, path, method, websocket)
clone()The objects of this class are cloneable with this method.
Middleware$clone(deep = FALSE)
deepWhether to make a deep clone.
Router and Middleware
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.