ihp
ihp copied to clipboard
Improving the custom routing (with parameters)
When defining parseRoute', there is no easy access to query parameters.
In general, param and all the family of param* functions depend on ControllerContext. But it wolud be better to make it depend on any context having access to a RequestContext, as the only operations that rely directly on the context seem to be paramOrError and allParams, and both use only the RequestContext inside the ControllerContext.
Have you seen that this was merged? https://github.com/digitallyinduced/ihp/pull/1410/files
Functions like paramOrError make sense inside a controller, but not inside the router parser, routing errors should be handled as 404 Not Found.