Middleware¶
Warning
The following classes should not be called directly.
MiddlewareController¶
-
class
dragonfly.middleware.middleware_controller.MiddlewareController¶ Bases:
objectLoads 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) – TheResponsethat the router has generated. If the ‘after’ function accepts theResponseclass it is passed on (to allow for its modification).
Returns: If a
Responseis generated return thisReturn type:
-