https://kotlinlang.org logo
Title
t

tylerwilson

09/21/2021, 4:02 PM
Easy one perhaps: I am using Ktor client side in KMM module, and set query params like so everywhere:
parameters.apply {
   append("key", value)
   ...
}
but all the append calls have the
This API is internal in ktor and should not be used. It could be removed or changed without notice.
warning. Is there is a more standard way to define params that will not give this warning?
a

Aleksei Tirman [JB]

09/21/2021, 7:46 PM
The way you add query parameters is standard. This warning will be fixed in Ktor 2.0.0. To disable it you can add
@OptIn(InternalAPI::class)
annotation. For more information please read KTOR-3001.
t

tylerwilson

09/21/2021, 8:15 PM
Cool, thank you. I will just wait, since I use it in a few hundred places…