add_middleware: Internal function to add middleware
Description
Internal function to add middlewareUsage
add_middleware(jug, func, path = NULL, method = NULL, websocket = FALSE)
Arguments
method
the method to bind to
websocket
should the middleware bind to the websocket protocol