Gigahorse 

Gigahorse is an HTTP client for Scala that can wrap either Square OkHttp, Async Http Client, or Akka HTTP underneath.

Setup 

For Square OkHttp Client:

libraryDependencies += "com.eed3si9n" %% "gigahorse-okhttp" % "0.5.0"

For Async HTTP Client:

libraryDependencies += "com.eed3si9n" %% "gigahorse-asynchttpclient" % "0.5.0"

Akka HTTP support is experimental:

libraryDependencies += "com.eed3si9n" %% "gigahorse-akka-http" % "0.5.0"

Dependencies 

Gigahorse-OkHttp depends on Scala and Square OkHttp. It also depends on Lightbend SSL Config and Lightbend Config.

Gigahorse-AsyncHttpClient depends on Scala, AHC 2.0, which brings in Netty 4.

Gigahorse-Akka-HTTP is experimental, and not all features are hooked up.

Credits 

License 

Apache v2

Quick start 

Here’s a quick example of how to make a GET call using Gigahorse:

scala> import gigahorse._, support.okhttp.Gigahorse
import gigahorse._
import support.okhttp.Gigahorse
scala> import scala.concurrent._, duration._
import scala.concurrent._
import duration._
scala> val http = Gigahorse.http(Gigahorse.config)
http: gigahorse.HttpClient = gigahorse.support.okhttp.OkhClient@4a008816
scala> val r = Gigahorse.url("https://api.duckduckgo.com").get.
         addQueryString(
           "q" -> "1 + 1"
         )
r: gigahorse.Request = Request(https://api.duckduckgo.com, GET, EmptyBody(), Map(), Map(q -> List(1 + 1)), None, None, None, None, None, None)
scala> val f = http.run(r, Gigahorse.asString andThen {_.take(60)})
f: scala.concurrent.Future[String] = Future(<not completed>)
scala> Await.result(f, 120.seconds)
res0: String = <!DOCTYPE html><html lang="en_US" class="no-js has-zcm   "><
scala> http.close()

Gigahorse