> For the complete documentation index, see [llms.txt](https://devon-miller.gitbook.io/my-dispatch-user-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devon-miller.gitbook.io/my-dispatch-user-notes/install_and_use.md).

# Usage and Installation

See the standard dispatch documentation site for installation and basic usage information: [here](http://dispatch.databinder.net/Dispatch.html). It even provides instructions to quickly setup a sbt project directory:

```bash
echo 'libraryDependencies += 
  "net.databinder.dispatch" %% "dispatch-core" % "0.11.2"' > build.sbt
sbt console
```

For many of the examples in this book, I used the amm ([ammonite](http://www.lihaoyi.com/Ammonite/#Ammonite)) shell which provides a convenient way to quickly test short programs but does not require a sbt project setup.

Start your amm shell using:

```bash
shell>amm
user-pwd@
```

Then load the dispatch library:

```scala
@load.ivy("net.databinder.dispatch" %% "dispatch-core" % "0.11.3") 
@import dispatch._, Defaults._
```

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.
