Amin Bahiraei
02/28/2022, 12:29 PMdefaultRequest
but it crashesh in iOS, and when I wanna set contentType
in post request,
this exception raise
I have also installed `ContentNegotation` and `json`
Fail to serialize body. Content has type: class org.metatude.paxfa.auth.login.LoginEmailRequestDto, but OutgoingContent expected.
If you expect serialized body, please check that you have installed the corresponding plugin(like `ContentNegotiation`) and set `Content-Type` header.
Aleksei Tirman [JB]
03/01/2022, 7:31 AMAmin Bahiraei
03/02/2022, 7:19 AMHttpClient
with bellow configure, and it cause a crash on iOS.
defaultRequest {
url {
protocol = URLProtocol.HTTPS
host = baseUrl
}
contentType(ContentType.Application.Json)
}
install(ContentNegotiation) {
json()
}
it is works on 1.6.7
but crash in 2.0.0-beta1
ps:
when you wanna send post request with data class (I also make it serialize using @Serializable
it causes crash).Aleksei Tirman [JB]
03/02/2022, 9:15 AM2.0.0-eap-327
. Please try to use that version with the new native memory model enabled (kotlin.native.binary.memoryModel=experimental
in Gradle). Also, include the following repositories in the Gradle build:
maven { url "<https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven>" }
maven { url "<https://maven.pkg.jetbrains.space/public/p/ktor/eap>" }