
com.github.jchanghong.http.tests.kt Maven / Gradle / Ivy
package com.github.jchanghong.http
import cn.hutool.core.thread.ThreadUtil
import com.google.common.net.MediaType
fun main() {
// jch_okhttp_debug=false
println(HttpHelper.getSyn("https://www.baidu.com"))
println(MediaType.JSON_UTF_8.toString())
HttpHelper.pviaConfig("https://50.1.172.2")
// println(HttpHelper.getSyn("https://50.1.172.2/iface-web/index.do"))
HttpHelper.pvia_startTimer()
ThreadUtil.sleep(20000)
val postJsonStringSyn = HttpHelper.postJsonStringSyn(
"https://50.1.172.2/ibody-web/web/search/findIntelliSearchResult.do", """
{"startTime":"2022-02-10T00:00:00.000+08:00","endTime":"2022-02-10T23:59:59.000+08:00","otherConditionJson":"{\"rideStatus\":false,\"direction\":\"\",\"gender\":\"\",\"glass\":\"\",\"hairStyle\":\"\",\"ageGroup\":\"\",\"cyclingPersonNumber\":\"\",\"targetSize\":\"\",\"jacketType\":\"\",\"mask\":\"\",\"bag\":\"\",\"ride\":\"\",\"cyclingType\":\"\",\"speed\":\"\",\"trousersType\":\"\",\"hat\":\"\",\"things\":\"\",\"vehicleType\":\"\",\"jacketColor\":\"\",\"trousersColor\":\"\"}","resourceType":"CAMERA","filterLink":"all","key":1644486157467,"pageNo":1,"pageSize":20}
""".trimIndent()
)
println(postJsonStringSyn)
println(postJsonStringSyn.pviaOkBody())
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy