Okhttp传参方式不同,tornado服务器那边的解析方式也就不同,这里记录两种通用的传参方式及对应的解析方式:
- 普通form表格方式:
1)okhttp:
val formBody = FormBody.Builder()
for(entry in params.entries){
formBody.add(entry.key as String,entry.value as String)
}
val requestBody = formBody.build()
val request: Request = Request.Builder