aboutsummaryrefslogtreecommitdiff
path: root/async-http-client-backend/future
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2018-03-21 19:01:02 -0400
committeradamw <adam@warski.org>2018-03-21 19:01:02 -0400
commitd06c93b7691dec9b79e36c675440cfd28e93975c (patch)
tree5aaf420c913b1f25ce66cd07be6b904de8fdc748 /async-http-client-backend/future
parent595b78eaf35673838697fe9ce8e6cf75bb2ac78b (diff)
downloadsttp-d06c93b7691dec9b79e36c675440cfd28e93975c.tar.gz
sttp-d06c93b7691dec9b79e36c675440cfd28e93975c.tar.bz2
sttp-d06c93b7691dec9b79e36c675440cfd28e93975c.zip
Updating async-http-client
Diffstat (limited to 'async-http-client-backend/future')
-rw-r--r--async-http-client-backend/future/src/main/scala/com/softwaremill/sttp/asynchttpclient/future/AsyncHttpClientFutureBackend.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/async-http-client-backend/future/src/main/scala/com/softwaremill/sttp/asynchttpclient/future/AsyncHttpClientFutureBackend.scala b/async-http-client-backend/future/src/main/scala/com/softwaremill/sttp/asynchttpclient/future/AsyncHttpClientFutureBackend.scala
index d91f404..e5f7a2c 100644
--- a/async-http-client-backend/future/src/main/scala/com/softwaremill/sttp/asynchttpclient/future/AsyncHttpClientFutureBackend.scala
+++ b/async-http-client-backend/future/src/main/scala/com/softwaremill/sttp/asynchttpclient/future/AsyncHttpClientFutureBackend.scala
@@ -4,6 +4,7 @@ import java.nio.ByteBuffer
import com.softwaremill.sttp.asynchttpclient.AsyncHttpClientBackend
import com.softwaremill.sttp.{FollowRedirectsBackend, FutureMonad, SttpBackend, SttpBackendOptions}
+import io.netty.buffer.ByteBuf
import org.asynchttpclient.{AsyncHttpClient, AsyncHttpClientConfig, DefaultAsyncHttpClient}
import org.reactivestreams.Publisher
@@ -13,7 +14,8 @@ class AsyncHttpClientFutureBackend private (asyncHttpClient: AsyncHttpClient, cl
implicit ec: ExecutionContext)
extends AsyncHttpClientBackend[Future, Nothing](asyncHttpClient, new FutureMonad, closeClient) {
- override protected def streamBodyToPublisher(s: Nothing): Publisher[ByteBuffer] = s // nothing is everything
+ override protected def streamBodyToPublisher(s: Nothing): Publisher[ByteBuf] =
+ s // nothing is everything
override protected def publisherToStreamBody(p: Publisher[ByteBuffer]): Nothing =
throw new IllegalStateException("This backend does not support streaming")