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

Abbas A

04/26/2019, 2:31 PM
Hi, I have a question regarding mapping routing with special characters, example:
get("/item/{itemId}/search?address[lat]={lat}")
unfortunately ktor can’t map it, from server I see that request was encoded as:
/item/1234/search?address%5Blat%5D={lat}
is it issue or I do something wrong? I tried to find something here or in docs, what I found is:
<https://ktor.io/servers/features/routing.html#tracing>
after applying trace to routing:
/item/1234/search?address[lat]={lat}, segment:3 -> FAILURE "Selector didn't match" @ /item/1234/search?address%5Blat%5D={lat})
As I understand mapping in
get/post/...
rely on path params only
n

Nikky

04/26/2019, 3:10 PM
you map the path
/item/{itemId}/search
and access the values after
?
differently
20 Views