Questions & Answers

What is the scope of HTTP controllers and functional http routes?

Deepkit HTTP
50 up-votes
Warning: The answer is generated by an artificial intelligence. It might not be correct.
To adjust rating, open the thread in Discord and click on the up/down vote button.

The scope of HTTP controllers and functional http routes is within the http dependency injection scope. HTTP controllers are instantiated for each HTTP request, allowing them to access providers registered for the http scope. Functional routes, on the other hand, can be registered via the router registry obtained from the DI container of the app and have access to the dependency injection container. Both HTTP controllers and functional routes can also access providers registered for the http scope.