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.3.0"

For Async HTTP Client:

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

Akka HTTP support is experimental:

libraryDependencies += "com.eed3si9n" %% "gigahorse-akka-http" % "0.3.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> Gigahorse.withHttp(Gigahorse.config) { http =>
         val r = Gigahorse.url("http://api.duckduckgo.com").get.
           addQueryString(
             "q" -> "1 + 1",
             "format" -> "json"
           )
         val f = http.run(r, Gigahorse.asString andThen {_.take(60)})
         Await.result(f, 120.seconds)
       }
res0: String = {"DefinitionSource":"","Heading":"1+1","ImageWidth":0,"Relat

Gigahorse