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

Cicero

11/26/2020, 12:50 AM
Is it standard for Ktor or KotlinxSerialization to chop a request? I was trying to understand what was happening and after inspecting into the
Copy code
@Deprecated("This is going to become internal. Use Pipeline.execute() instead.")
public fun <TSubject : Any, TContext : Any> pipelineExecutorFor(
    context: TContext,
    interceptors: List<PipelineInterceptor<TSubject, TContext>>,
    subject: TSubject
): @Suppress("DEPRECATION") PipelineExecutor<TSubject> {
    return SuspendFunctionGun(subject, context, interceptors)
}
I found that my body is being sent in half
Copy code
private val json = Json {
    isLenient = true; ignoreUnknownKeys = true; coerceInputValues = true; useArrayPolymorphism =
    true
}

internal val client = HttpClient() {
    install(JsonFeature) {
        serializer = KotlinxSerializer(json)
    }
}
Confusing. it is working.
I changed this
Copy code
<http://client.post|client.post><HttpResponse>
from Unit And I removed and added my Json parameters in 2 clean builds
I also tried with my login post request, adding more values to it’s body, and it was removing some of them before sending