This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Getting Started
satabin edited this page Sep 21, 2014
·
15 revisions
Starting with version 1.0.0, sohva is based on spray for making Http requests, which itself uses akka actors.
Sohva has a dependency on akka-actors but with provided scope, this means that you need to add your own explicit dependency on akka.
for example if you are using sbt:
libraryDependencies += "org.gnieh" %% "sohva-client" % "1.0.0"
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.6"
Support for scala 2.9.x series was dropped in this version, and is only compiled against scala 2.10.
Usage is the same as before, the only visible changes at a first sight is that you need an implicit ActorSystem
and Timeout
in scope.
import akka.actor.ActorSystem
import akka.util._
import scala.concurrent.duration._
import gnieh.sohva.async._
implicit val system = ActorSystem()
implicit val timeout = Timeout(20.seconds)
val couch = new CouchClient
Then you can use it just like the old version.
You can find the API documentation at http://gnieh.github.io/sohva/v1.0.0/