diff options
author | adamw <adam@warski.org> | 2017-10-06 14:19:44 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-10-06 14:19:44 +0200 |
commit | bb7abc189d9a5f079caa47a4508b5ae585dc8bcf (patch) | |
tree | 4d096e1b0c78156df923a7cf3282a86507b8ef8b /async-http-client-backend/monix | |
parent | 43baccc0edf12e8951c903d6697d7ee24a201e63 (diff) | |
download | sttp-bb7abc189d9a5f079caa47a4508b5ae585dc8bcf.tar.gz sttp-bb7abc189d9a5f079caa47a4508b5ae585dc8bcf.tar.bz2 sttp-bb7abc189d9a5f079caa47a4508b5ae585dc8bcf.zip |
#10: add proxy support
Diffstat (limited to 'async-http-client-backend/monix')
-rw-r--r-- | async-http-client-backend/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/AsyncHttpClientMonixBackend.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/async-http-client-backend/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/AsyncHttpClientMonixBackend.scala b/async-http-client-backend/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/AsyncHttpClientMonixBackend.scala index c08c244..9cb44f2 100644 --- a/async-http-client-backend/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/AsyncHttpClientMonixBackend.scala +++ b/async-http-client-backend/monix/src/main/scala/com/softwaremill/sttp/asynchttpclient/monix/AsyncHttpClientMonixBackend.scala @@ -6,6 +6,7 @@ import com.softwaremill.sttp.{ FollowRedirectsBackend, MonadAsyncError, SttpBackend, + SttpBackendOptions, Utf8, concatByteBuffers } @@ -20,7 +21,6 @@ import org.asynchttpclient.{ } import org.reactivestreams.Publisher -import scala.concurrent.duration.FiniteDuration import scala.util.{Failure, Success} class AsyncHttpClientMonixBackend private ( @@ -62,13 +62,11 @@ object AsyncHttpClientMonixBackend { * @param s The scheduler used for streaming request bodies. Defaults to the * global scheduler. */ - def apply(connectionTimeout: FiniteDuration = - SttpBackend.DefaultConnectionTimeout)( + def apply(options: SttpBackendOptions = SttpBackendOptions.Default)( implicit s: Scheduler = Scheduler.Implicits.global) : SttpBackend[Task, Observable[ByteBuffer]] = - AsyncHttpClientMonixBackend( - AsyncHttpClientBackend.defaultClient(connectionTimeout.toMillis.toInt), - closeClient = true) + AsyncHttpClientMonixBackend(AsyncHttpClientBackend.defaultClient(options), + closeClient = true) /** * @param s The scheduler used for streaming request bodies. Defaults to the |