tylerwilson
12/27/2021, 8:01 PM"Header(s) [Content-Type] are controlled by the engine and cannot be set explicitly"
if I try to remove the contentType call on Android, then it fails with
java.lang.IllegalStateException: Fail to serialize body. Content has type: class MyRequest (Kotlin reflection is not available), but OutgoingContent expected.
If you expect serialized body, please check that you have installed the corresponding plugin(like `ContentNegotiation`) and set `Content-Type` header.
So it seems like we cannot do common code in this case. Anybody?e5l
12/27/2021, 8:04 PMtylerwilson
12/27/2021, 8:04 PMprivate val client = HttpClient {
install(ContentNegotiation) {
json(parser)
}
internal val parser = Json { ignoreUnknownKeys = true; isLenient = true; useAlternativeNames = false; }
e5l
12/27/2021, 8:06 PMtylerwilson
12/27/2021, 11:32 PMe5l
12/30/2021, 2:31 PMtylerwilson
12/30/2021, 2:38 PMe5l
12/30/2021, 2:38 PMAmin Bahiraei
02/28/2022, 12:43 PMe5l
02/28/2022, 12:49 PMAmin Bahiraei
02/28/2022, 12:51 PMe5l
02/28/2022, 12:51 PMAleksei Tirman [JB]
03/02/2022, 5:11 PMAmin Bahiraei
03/05/2022, 7:45 AMtylerwilson
03/08/2022, 3:21 PM