diff options
author | adamw <adam@warski.org> | 2017-07-24 12:26:50 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-07-24 12:26:50 +0200 |
commit | 986f6ff409b91230924508eafa7e4c077358dfed (patch) | |
tree | f665f48d6e99e8e0dd5c907638c2fda876a41641 /async-http-client-handler/monix/src | |
parent | ccd2c4b1d53bf68e04ff1f8bca032d870494d9a8 (diff) | |
download | sttp-986f6ff409b91230924508eafa7e4c077358dfed.tar.gz sttp-986f6ff409b91230924508eafa7e4c077358dfed.tar.bz2 sttp-986f6ff409b91230924508eafa7e4c077358dfed.zip |
Adding missing implicit EC to Future/AsyncHttpClient handler
Diffstat (limited to 'async-http-client-handler/monix/src')
-rw-r--r-- | async-http-client-handler/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/MonixAsyncHttpClientHandler.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/async-http-client-handler/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/MonixAsyncHttpClientHandler.scala b/async-http-client-handler/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/MonixAsyncHttpClientHandler.scala index 30106f2..fab9c98 100644 --- a/async-http-client-handler/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/MonixAsyncHttpClientHandler.scala +++ b/async-http-client-handler/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/MonixAsyncHttpClientHandler.scala @@ -21,6 +21,15 @@ class MonixAsyncHttpClientHandler(asyncHttpClient: AsyncHttpClient) def this(cfg: AsyncHttpClientConfig) = this(new DefaultAsyncHttpClient(cfg)) } +object MonixAsyncHttpClientHandler { + def apply(): MonixAsyncHttpClientHandler = + new MonixAsyncHttpClientHandler(new DefaultAsyncHttpClient()) + def usingConfig(cfg: AsyncHttpClientConfig): MonixAsyncHttpClientHandler = + new MonixAsyncHttpClientHandler(new DefaultAsyncHttpClient()) + def usingClient(client: AsyncHttpClient): MonixAsyncHttpClientHandler = + new MonixAsyncHttpClientHandler(client) +} + private[monix] object TaskMonad extends MonadAsyncError[Task] { override def unit[T](t: T): Task[T] = Task.now(t) |