Middleware¶
Warning
The following classes should not be called directly.
MiddlewareController¶
-
class
dragonfly.middleware.middleware_controller.
MiddlewareController
¶ Bases:
object
Loads all registered middleware and controls their execution.
-
run_after
(action, response)¶ Run all the after methods on the middleware that are assigned to the given action.
Parameters: - action (str) – The action currently being executed.
- response (
Response
) – TheResponse
that the router has generated. If the ‘after’ function accepts theResponse
class it is passed on (to allow for its modification).
Returns: If a
Response
is generated return thisReturn type:
-