Pim
08/08/2025, 4:30 PM{…}
always follows a /
(end of a path segment). Is this a requirement or can the tailcard be used anywhere in the path?
For example, a route like /test{…}
. I’ve tested this and it works precisely as I want; I just like to confirm that this is also intended and will not be patched later.Aleksei Tirman [JB]
08/11/2025, 9:35 AMPim
08/15/2025, 9:05 AMrouting {
get(“/{…}”) {
call.respond(“root”)
}
get(“/test/{…}”) {
call.respond(“test”)
}
}
Example B:
routing {
get(“/{…}”) {
call.respond(“root”)
}
get(“/test{…}”) {
call.respond(“test”)
}
}
Now if I use on Example A:
client.get(“/test/someextra”)
I get response: “test”
.
If I use on Example B:
client.get(“/test/someextra”)
I get response: “root”
.
If I switch the order of routes in example B I then get response: “test”
.
Do I understand correctly that the order of routes matter in the case you try to match with tail cards on the same path segment?Aleksei Tirman [JB]
08/18/2025, 10:10 AMPim
08/18/2025, 11:54 AM