Luiz Aguiar
11/16/2022, 10:55 PMinstall
statement?
@Test
fun testOptimizeRouter() = testApplication {
val client = createClient {
install(ContentNegotiation) {
json()
}
}
// omitted
}
Ktor 2.1.3
Kotlin 1.7.21
IDEA CE 2022.3 Beta (EAP)hfhbd
11/16/2022, 11:02 PMinstall
matches the client as well as the server plugin dslLuiz Aguiar
11/17/2022, 10:20 AMhfhbd
11/17/2022, 11:10 AMinstall
is used in the client config dsl as well as in the server config dsl. Because you use application {
and inside this scope, you call client {
, there is a mismatch because both have an install
function.Rustam Siniukov
11/17/2022, 11:40 AMContentNegotiation
plugin into client. Please check your imports.Luiz Aguiar
11/19/2022, 11:12 AMserver
plugin, additionally I had to added ktor-client-content-negotiation
dependency to be able to use the client version of the plugin… a bit tricky tbh, but worked in the end.