davidasync
02/22/2019, 8:23 AMsuspend fun main () = coroutineScope {
var counter = 1
launch {
while (true) {
HttpClient(Apache) {
engine {
}
}.use {
val clientResponse = it.call {
method = <http://HttpMethod.Post|HttpMethod.Post>
url(URL("<https://httpbin.org/post>"))
body = TextContent(bodyVal, contentType = ContentType("application", "json"))
}.response
val jsonResponseString = String(clientResponse.readBytes())
println(counter.toString())
counter += 1
}
}
}
println("abc")
}
e5l
02/22/2019, 8:27 AMdavidasync
02/22/2019, 8:29 AMe5l
02/22/2019, 8:30 AMdavidasync
02/22/2019, 8:35 AMe5l
02/22/2019, 8:36 AMdavidasync
02/22/2019, 8:37 AMe5l
02/22/2019, 8:52 AMdavidasync
02/22/2019, 8:53 AM