Viktor Orlyk
04/17/2022, 8:10 AMval client = HttpClient(CIO) {
install(ContentNegotiation) {
json(Json {
prettyPrint = true
isLenient = true
})
}
}
my ide shows an error in there
'fun <P : Pipeline<*, ApplicationCall>, B : Any, F : Any> Application.install(plugin: Plugin<Application, ContentNegotiationConfig, PluginInstance>, configure: ContentNegotiationConfig.() -> Unit = ...): PluginInstance' can't be called in this context by implicit receiver. Use the explicit one if necessary
Aleksei Tirman [JB]
04/17/2022, 8:13 AMContentNegotiation
for both client and server.Aleksei Tirman [JB]
04/17/2022, 8:14 AMViktor Orlyk
04/17/2022, 8:16 AMimplementation("io.ktor:ktor-server-content-negotiation:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
Aleksei Tirman [JB]
04/17/2022, 8:16 AMViktor Orlyk
04/17/2022, 8:25 AM