Skip to content

Instantly share code, notes, and snippets.

View evgzakharov's full-sized avatar

Nerumb evgzakharov

View GitHub Profile
@evgzakharov
evgzakharov / gist:2f4a3a6fbcbc3ba81ff146d83a7fcd61
Last active October 22, 2019 08:27
Kotlin async-http-client integration
import io.netty.handler.codec.http.EmptyHttpHeaders
import io.netty.handler.codec.http.HttpHeaders
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.suspendCancellableCoroutine
import org.asynchttpclient.AsyncHandler
import org.asynchttpclient.AsyncHttpClient
import org.asynchttpclient.HttpResponseBodyPart
import org.asynchttpclient.HttpResponseStatus
import org.asynchttpclient.Request
import java.util.ArrayList
class GlobalCase {
fun someFun(): Unit {}
fun String.stringFun() {
}
}
fun main(args: Array<String>) {
val test: String = File("sadfasd").readText()