El Zhang
01/15/2021, 11:40 AMclient.requestPipeline.intercept(HttpRequestPipeline.Before) {
val body = context.body
}
but since context.body is an data class (not an encoded string), and I could not encode it using kotlinx.serializer because I don’t have correspoding serializer of that data class at this moment (the type of context.body
is Any). Thus I don’t know how to do that with a generic interceptor.
The initial requirement is to encrypt the body and replace it.