aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBjørn Madsen <bm@aeons.dk>2017-08-04 11:43:25 +0200
committerBjørn Madsen <bm@aeons.dk>2017-08-04 11:43:25 +0200
commit5ce4a596d49e7da42b8a60d438094f3ba67ab3f5 (patch)
treeac015e84a6b0d282fe83014c60b8416174a6bed8 /README.md
parentf19d7968cd6990b5162fa490e10085f81c451eb5 (diff)
downloadsttp-5ce4a596d49e7da42b8a60d438094f3ba67ab3f5.tar.gz
sttp-5ce4a596d49e7da42b8a60d438094f3ba67ab3f5.tar.bz2
sttp-5ce4a596d49e7da42b8a60d438094f3ba67ab3f5.zip
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index 25f51d4..ed8215d 100644
--- a/README.md
+++ b/README.md
@@ -188,6 +188,7 @@ uri"$scheme://$subdomains.example.com?x=$vx&$params#$jumpTo"
| `FutureAsyncHttpClientHandler` | `scala.concurrent.Future` | - |
| `ScalazAsyncHttpClientHandler` | `scalaz.concurrent.Task` | - |
| `MonixAsyncHttpClientHandler` | `monix.eval.Task` | `monix.reactive.Observable[ByteBuffer]` |
+| `CatsAsyncHttpClientHandler` | `F[_]: cats.effect.Async` | - |
| `OkHttpSyncClientHandler` | None (`Id`) | - |
| `OkHttpFutureClientHandler` | `scala.concurrent.Future` | - |
@@ -271,6 +272,8 @@ To use, add the following dependency to your project:
"com.softwaremill.sttp" %% "async-http-client-handler-scalaz" % "0.0.4"
// or
"com.softwaremill.sttp" %% "async-http-client-handler-monix" % "0.0.4"
+// or
+"com.softwaremill.sttp" %% "async-http-client-handler-cats" % "0.0.4"
```
This handler depends on [async-http-client](https://github.com/AsyncHttpClient/async-http-client).
@@ -284,6 +287,8 @@ The responses are wrapped depending on the dependency chosen in either a:
dependency on `scalaz-concurrent`.
* [Monix](https://monix.io) `Task`. There's a transitive dependency on
`monix-eval`.
+* Any type implementing the [Cats Effect](https://github.com/typelevel/cats-effect) `Async`
+typeclass, such as `cats.effect.IO`. There's a transitive dependency on `cats-effect`.
Next you'll need to add an implicit value:
@@ -296,6 +301,9 @@ implicit val sttpHandler = ScalazAsyncHttpClientHandler()
// or, if you're using the monix version:
implicit val sttpHandler = MonixAsyncHttpClientHandler()
+// or, if you're using the cats effect version:
+implicit val sttpHandler = CatsAsyncHttpClientHandler[cats.effect.IO]()
+
// or, if you'd like to use custom configuration:
implicit val sttpHandler = FutureAsyncHttpClientHandler.usingConfig(asyncHttpClientConfig)
@@ -433,4 +441,5 @@ and pick a task you'd like to work on!
* [Tomasz Szymański](https://github.com/szimano)
* [Adam Warski](https://github.com/adamw)
-* [Omar Alejandro Mainegra Sarduy](https://github.com/omainegra) \ No newline at end of file
+* [Omar Alejandro Mainegra Sarduy](https://github.com/omainegra)
+* [Bjørn Madsen](https://github.com/aeons)