Usage and Installation
Last updated
Was this helpful?
Last updated
Was this helpful?
See the standard dispatch documentation site for installation and basic usage information: . It even provides instructions to quickly setup a sbt project directory:
For many of the examples in this book, I used the amm () shell which provides a convenient way to quickly test short programs but does not require a sbt project setup.
Start your amm shell using:
Then load the dispatch library:
You can now use dispatch.
The Defaults._
import brings in a scala ExecutionContext. If you want to you your own ExecutionContext, do not import the defaults. It also imports a netty Timer which is used in a few parts of the dispatch library. The imports also pulls in the scala definition of Future so you do not have to include it explicitly.
Using dispatch via the maven coordinates pulls in a < 2.0 version of async-http-client.