https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

Lawrence

06/26/2022, 11:25 PM
is it possible to use ktor's type-safe requests to call an endpoint that needs a query param with no argument. I tried doing this:
Copy code
@Serializable
@Resource("/end_point")
class EndPoint(val query: String? = "")

client().get(EndPoint())
This results in:
<http://base_url/end_point?query=>
but I just want it to be
<http://base_url/end_point?query>
c

Chris Fillmore

06/27/2022, 2:41 AM
Try #ktor
l

Lawrence

06/27/2022, 4:36 AM
thanks!
7 Views