krop
krop copied to clipboard
Routes should be able to generate paths
Routes should be able to generate a path that will call that route, so that the path can be embedded into HTML. E.g. if I have a route
val viewUser =
Route(
Request.get(Path.root / user / Param.int),
Response.ok[String]
)
I should be able call something like viewUser.path(1234) to produce "/user/1234".
In other words Routes should be bidirectional. This is a step towards allowing routes to be used on the front and backend (and then automatically generating clients from routes).