You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/basics/dynamic-modules.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -141,4 +141,4 @@ When `AppFactory` starts module bootstrapping, `my_module_configuration_factory`
141
141
all the required **parameters** and returned a `DynamicModule` of `MyModule`.
142
142
143
143
For more example, checkout [Ellar Throttle Module](https://github.com/eadwinCode/ellar-throttler/blob/master/ellar_throttler/module.py){target="_blank"}
144
-
or [Ellar Cache Module](../../techniques/caching){target="_blank"}
144
+
or [Ellar Cache Module](../techniques/caching.md){target="_blank"}
# Use the ctx object to access the current execution context
180
180
res = ctx.switch_to_http_connection().get_response()
181
181
res.status_code =200
@@ -185,7 +185,8 @@ class UserController:
185
185
186
186
```
187
187
188
-
In this example, the `get_user` method is decorated with the `@get` decorator to handle a GET request to the /users/:id route. The `Context()` function is applied to the second parameter of the method, which will inject the current `ExecutionContext` object into the method.
188
+
In this example, the `get_user` method is decorated with the `@get` decorator to handle a GET request to the /users/:id route.
189
+
The `Inject[ExecutionContext]` annotation is applied to the second parameter of the method, which will inject the current `ExecutionContext` object into the method.
189
190
190
191
Once you have access to the `ExecutionContext` object, you can use its methods and properties to access information about the current request.
0 commit comments