is it possible to inject my own dependency on handle_spin function #2386
Replies: 3 comments 3 replies
-
Not sure how/why you want to inject into http_component.
Above is plain router example. But I wanted
and my request has
So I can ship some business logics or session releated stuffs from very early stage of route. |
Beta Was this translation helpful? Give feedback.
-
Also manipulation headers can be consider for some cases. |
Beta Was this translation helpful? Give feedback.
-
I think we'd much rather support existing frameworks for this kind of advanced functionality. For example, I have a demo of axum working with Spin that would give you this feature and many more: https://github.com/lann/wasi-hyperium/tree/main/examples/axum-server |
Beta Was this translation helpful? Give feedback.
-
wondering, if it is possible to DI my own dependencies in handle_spin function (example: game_manager: MyOwnDependency)
Beta Was this translation helpful? Give feedback.
All reactions