Gigahorse 

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

Setup 

For Async HTTP Client:

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

Akka HTTP support is experimental:

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

Dependencies 

Gigahorse-AsyncHttpClient depends on Scala, AHC 2.0, which brings in Netty 4. It also depends on Lightbend SSL Config and Lightbend Config.

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

Credits 

License 

Apache v2

Quick start 

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

scala> import gigahorse._, support.asynchttpclient.Gigahorse
import gigahorse._
import support.asynchttpclient.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