is there a reason this is Any ? <https://github.co...
# ktor
n
is there a reason this is Any ? https://github.com/ktorio/ktor/blob/master/ktor-client/ktor-client-core/src/io/ktor/client/request/HttpRequest.kt#L84 or did nothing in the pipeline require this to me a reified type parameter yet ?
d
I guess the Any is to support String, ByteArray and any object to be used with the JsonFeature?
n
that is all fine when the json implementations only use reflection i think this should be
body: T
where T is
reified T : Any
so it can be used in a TypeInfo and passed down the pipeline
that would allow better registering of custom serializers on the kotlinx-serializer feature for se, since atm i can oly match by KClass<*> which dies when it encounters generics or arrays
d
hat would propagate the type everywhere, and classes are not reified only methods. Maybe there could be an inline method to set the body, that stores the body along the typeinfo in another var
but not sure about the details
@e5l