https://kotlinlang.org logo
#ktor
Title
# ktor
j

Joris

10/08/2019, 1:55 PM
When looking to the generated trace in the first case the
/api
isn't prepend to the other routes as I fought it would, instead ktor try to match /api or /foo or /baz. Is there a way to mutualize a part of a route without adding it in every Routing ? It's quite redundant to put the
/api
in every Routing file that I might create. Also in my web.xml I tried to put
/api
in the url-pattern, but ktor doesn't seems to base its matching on it and try to work from
/
instead.
d

diesieben07

10/08/2019, 2:06 PM
Make your extensions (
fooApi
, etc) on
Route
, not
Routing
.
j

Joris

10/08/2019, 2:08 PM
Simple as that 😅 Thanks !
r

ribesg

10/08/2019, 2:09 PM
Yeah you’re explicitely using the wrong
this