【发布时间】:2020-04-01 09:27:52
【问题描述】:
以下是我尝试过的代码。我正在 commonMain 块中尝试以下代码。
suspend fun callHttpFunction(){
val clientEngine = HttpClient{
engine {
pipelining = true
threadsCount = 4
}
}
clientEngine.post<String>("https","m2.testing.com",8080,
"/TokenServiceEncrypt/api/base/TokenUpdated",requestBlock
) {
headers.append("Content-Type", "application/json")
headers.append("Accept", "application/json")
headers.append("SessionToken", "seesfssfsf")
}
clientEngine.close()
}
//HttpClient(Apache) fails and so does HttpClient(OkHttp)
【问题讨论】:
-
控制台输出是什么?
标签: kotlin httpclient multiplatform ktor