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

tjb

02/24/2019, 6:00 PM
would anyone have any guidance if i wanted to send a param like
?myParam=text,2.0
?
d

dewildte

02/24/2019, 6:12 PM
Can you be bit more specific towards usage?
r

Riccardo Montagnin

02/24/2019, 7:45 PM
If you want to store it as a tuble you could make an extension function such as
List<String>.toTuple()
returning a custom object, and then invoking it such as
call.queryParameters.get("myParam").toTuple()
t

tjb

02/25/2019, 5:03 PM
Sure sorry for not being clear. I want to send a request for filtering on job posts. Example: I am searching for Java job posts but with the version of 1.6 so I would like to submit
<http://myapp.com/api/v1/search?tag=Java,1.6|myapp.com/api/v1/search?tag=Java,1.6>
. where i can then parse this param into two separate values of
val tag = "Java"
and
val version = "1.6"
@dewildte
@Riccardo Montagnin thats a good idea since the param is considered a list