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
Ok, I know now that the format string is translated to route template like so;
So getting the path works: linker.GetPathByName("get_houses_by", {|s0 = "test"|})
Now I am wondering if
Giraffe (optionally) could work with ekhm.... route templated format strings? :D
Like so; routef "/houses/%s{Name}" readHauseBy |> addMetadata(EndpointNameMetadata "get_house") ?
Or if the route template names can be somehow inferred from handlers? let readHauseBy (name: string): HttpHandler =
Or if the routeBind handler can be made to work with new EndpointRouting? (I guess that one will work better with LinkGenerator).
Ideas? Suggestions? I even my try to submit a PR with something but I want to go through discussion which way would be the best here.
Hi there,
I tried different ways but I just can't get the LinkGenerator to work with routef.
Let's say I have this endpoints:
and this 2 handlers:
In the first handler I am able to get the Uri by name. In the second... well.. no way. Ideas? In C# we can use it like this:
but here I have "{id} in the string, not "%s" I guess this might cause some issues. Any hints?
The text was updated successfully, but these errors were encountered: