A minimal setup of sttp
import $ivy.`com.softwaremill.sttp.client::core:2.0.0-RC2`
import sttp.client.quick.{quickRequest, UriContext, backend}
quickRequest.get(uri"http://httpbin.org/ip").send()
import $ivy.$ import sttp.client.quick.{quickRequest, UriContext, backend} res0_2: sttp.client.package.Identity[sttp.client.Response[String]] = Response( """{ "origin": "34.68.237.200, 34.68.237.200" } """, 200, "OK", Vector( Server: nginx, Access-Control-Allow-Origin: *, X-Content-Type-Options: nosniff, Connection: keep-alive, Date: Sat, 23 Nov 2019 13:44:50 GMT, X-Frame-Options: DENY, Referrer-Policy: no-referrer-when-downgrade, Access-Control-Allow-Credentials: true, Content-Encoding: gzip, Content-Length: 56, X-XSS-Protection: 1; mode=block, Content-Type: application/json ), List() )
Use the async http client backend of sttp, which uses the netty behind the scenes.
import $ivy.`com.softwaremill.sttp.client::async-http-client-backend-monix:2.0.0-RC2`
import sttp.client.asynchttpclient.monix._
implicit val sttpBackend = AsyncHttpClientMonixBackend()
import sttp.client.basicRequest
val r = basicRequest.get(uri"http://httpbin.org/ip")
import $ivy.$ import sttp.client.asynchttpclient.monix._ sttpBackend: monix.eval.Task[sttp.client.SttpBackend[monix.eval.Task, monix.reactive.Observable[java.nio.ByteBuffer], sttp.client.asynchttpclient.WebSocketHandler]] = Eval( sttp.client.asynchttpclient.monix.AsyncHttpClientMonixBackend$$$Lambda$3137/25163081@756ca83b ) import sttp.client.basicRequest r: sttp.client.package.Request[Either[String, String], Nothing] = RequestT( Method("GET"), Uri( "http", None, Segment( "httpbin.org", sttp.model.Uri$HostEncoding$$$Lambda$2773/926400242@3fc232d2 ), None, List( Segment( "ip", sttp.model.Uri$PathSegmentEncoding$$$Lambda$2788/455310151@4e33d01a ) ), Vector(), None ), NoBody, Vector(Accept-Encoding: gzip, deflate), MappedResponseAs( ResponseAsByteArray, sttp.client.MappedResponseAs$$Lambda$2766/571660107@3981f21 ), RequestOptions(true, 1 minute, 32, false), Map() )
import monix.execution.Scheduler.Implicits.global
val task = for {
backend <- sttpBackend
res <- r.send()(backend, implicitly)
} yield res
task.foreach(println)
Response(Right({ "origin": "34.68.237.200, 34.68.237.200" } ),200,OK,List(Access-Control-Allow-Credentials: true, Access-Control-Allow-Origin: *, Content-Type: application/json, Date: Sat, 23 Nov 2019 14:02:16 GMT, Referrer-Policy: no-referrer-when-downgrade, Server: nginx, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, X-XSS-Protection: 1; mode=block, Connection: keep-alive, transfer-encoding: chunked),List()) Response(Right({ "origin": "34.68.237.200, 34.68.237.200" } ),200,OK,List(Access-Control-Allow-Credentials: true, Access-Control-Allow-Origin: *, Content-Type: application/json, Date: Sat, 23 Nov 2019 14:02:16 GMT, Referrer-Policy: no-referrer-when-downgrade, Server: nginx, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, X-XSS-Protection: 1; mode=block, Connection: keep-alive, transfer-encoding: chunked),List())
import monix.execution.Scheduler.Implicits.global task: monix.eval.Task[sttp.client.Response[Either[String, String]]] = FlatMap( Eval( sttp.client.asynchttpclient.monix.AsyncHttpClientMonixBackend$$$Lambda$3137/25163081@756ca83b ), ammonite.$sess.cmd10$Helper$$Lambda$3378/676411879@78fb45b2 )
import $ivy.`com.linecorp.armeria:armeria:0.96.0`
import com.linecorp.armeria.client.WebClient
val client = WebClient.of("http://httpbin.org/")
val future = client.get("/ip").aggregate()
val res = future.join()
Downloading https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0.pom Downloaded https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final.pom Downloading https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.pom Downloading https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1.pom Downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.pom Downloaded https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-parent/4.1.43.Final/netty-parent-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-base/2.10.1/jackson-base-2.10.1.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-tcnative-parent/2.0.27.Final/netty-tcnative-parent-2.0.27.Final.pom Downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.29/slf4j-parent-1.7.29.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.10/jackson-parent-2.10.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.10/jackson-parent-2.10.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-tcnative-parent/2.0.27.Final/netty-tcnative-parent-2.0.27.Final.pom Downloaded https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.29/slf4j-parent-1.7.29.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-base/2.10.1/jackson-base-2.10.1.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-parent/4.1.43.Final/netty-parent-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-parent/4.0.29.Final/netty-parent-4.0.29.Final.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.10.1/jackson-bom-2.10.1.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-parent/4.0.29.Final/netty-parent-4.0.29.Final.pom Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.10.1/jackson-bom-2.10.1.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final.pom Downloaded https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final.pom Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar Downloading https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar Downloading https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar Downloading https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1.jar Downloaded https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1-sources.jar Downloaded https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar Downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1-sources.jar Downloaded https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29.jar Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar Downloading https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3-sources.jar Downloaded https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3-sources.jar Downloading https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1-sources.jar Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1-sources.jar Downloading https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver/4.1.43.Final/netty-resolver-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.3.1/micrometer-core-1.3.1-sources.jar Downloading https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.1.43.Final/netty-codec-haproxy-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/4.1.43.Final/netty-resolver-dns-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec/4.1.43.Final/netty-codec-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.43.Final/netty-transport-native-unix-common-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-common/4.1.43.Final/netty-common-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.43.Final/netty-transport-native-epoll-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29-sources.jar Downloaded https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.43.Final/netty-codec-http-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.27.Final/netty-tcnative-boringssl-static-2.0.27.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-handler/4.1.43.Final/netty-handler-4.1.43.Final-sources.jar Downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-dns/4.1.43.Final/netty-codec-dns-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-buffer/4.1.43.Final/netty-buffer-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.43.Final/netty-codec-http2-4.1.43.Final-sources.jar Downloaded https://repo1.maven.org/maven2/io/netty/netty-transport/4.1.43.Final/netty-transport-4.1.43.Final.jar Downloaded https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0-sources.jar Downloaded https://repo1.maven.org/maven2/com/linecorp/armeria/armeria/0.96.0/armeria-0.96.0.jar SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
import $ivy.$ import com.linecorp.armeria.client.WebClient client: WebClient = DefaultWebClient(com.linecorp.armeria.client.HttpClientDelegate@14054bd1) future: java.util.concurrent.CompletableFuture[com.linecorp.armeria.common.AggregatedHttpResponse] = java.util.concurrent.CompletableFuture@67d77643[Completed normally] res: com.linecorp.armeria.common.AggregatedHttpResponse = DefaultAggregatedHttpResponse{headers=[:status=200, access-control-allow-credentials=true, access-control-allow-origin=*, content-type=application/json, date=Sat, 23 Nov 2019 13:19:04 GMT, referrer-policy=no-referrer-when-downgrade, server=nginx, x-content-type-options=nosniff, x-frame-options=DENY, x-xss-protection=1; mode=block, content-length=47], content=DefaultHttpData{length=47}}
val body = res.contentUtf8
body: String = """{ "origin": "34.68.237.200, 34.68.237.200" } """