orangy
{p}/b/c
2️⃣ a/{p1}/{p2}
3️⃣ a/{...}
and request to a/b/c
, which route is expected to be selected?tipsy
10/20/2017, 11:15 PMorangy
jdiaz
10/20/2017, 11:19 PMorangy
{p1}/b/{p2}
?tipsy
10/20/2017, 11:31 PMit destroys application compositionis there a legitimate use-case for having colliding paths like this?
kenkyee
10/21/2017, 1:13 AMvonox7
10/21/2017, 12:29 PMorangy
vonox7
10/21/2017, 12:36 PMorangy
vonox7
10/21/2017, 1:07 PM/x
) i expect that ktor tries all routes that have parameter-matching, therefore using route a/{p}/x
2) i voted for (3), as i would expect again that ktor checks all exact routes. in my opinion the HTTP-Method is “part” of the route. In my opinion one could also build routes like GET/a/b/x POST
and POST/a/{p}/x POST
(and doing only POST-requests) and it should behave the same.orangy
https://twitter.com/orangy/followersThis one is obviously
{user}/followers
https://twitter.com/settings/safetyThis ons is likely
settings/{category}
Now let’s guess: https://twitter.com/settings/followersorangy
orangy
orangy
{user}/{list}
and redirects to {user}/lists/{list}
tipsy
10/21/2017, 2:22 PMMarc Knaup
10/21/2017, 3:32 PMMarc Knaup
10/21/2017, 3:33 PMMarc Knaup
10/21/2017, 3:34 PMorangy
Marc Knaup
10/21/2017, 3:40 PMwhen
) which is by order of cases.orangy
orangy
Marc Knaup
10/21/2017, 3:41 PMvonox7
10/21/2017, 4:35 PMvonox7
10/21/2017, 4:36 PMa/{p1}/{p2}
over a/{...}
)dave08
10/21/2017, 8:03 PMorangy
dave08
10/21/2017, 8:20 PMdave08
10/21/2017, 8:21 PMorangy
hhariri
Marc Knaup
10/22/2017, 10:25 AM/{id}
+ /me
+ /favicon.ico
+ /robots.txt
and so on.orangy
!important
also came to mind yesterday when trying to explain why simple but strict rules are important (pun intended)orangy
dave08
10/22/2017, 11:07 AMorangy
{...}
route. #2 is more flexible and works very close to how it works now, but a little bit more complex to formulate. #1 is easier to implement AutoOptions and such, #2 is harder.dave08
10/22/2017, 3:31 PMMarc Knaup
10/22/2017, 3:45 PMroute("a") { route("b") { … } }
be treated differently than route("a/b") { … }
?dave08
10/22/2017, 3:48 PM