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
{{ message }}
Repository navigation
Add asHandler extension to Router<Handler> for simplified handler usage #214
This issue tracks the feature implemented in PR #209 to add an asHandler extension to Router<Handler>, enabling routers to be used directly as handlers without wrapping with routeWith.
Feature Summary
Adds an asHandler extension method to Router<Handler>
Returns a handler that performs routing lookup
Provides appropriate responses:
404 when no route matches
405 for method mismatch (includes Allow header)
Simplifies common usage patterns where a router is the final handler in a pipeline
Benefits
Reduces boilerplate code
More intuitive API for simple routing scenarios
Maintains existing routing behavior while providing a cleaner interface
Activity