aboutsummaryrefslogtreecommitdiff
path: root/async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala
diff options
context:
space:
mode:
Diffstat (limited to 'async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala')
-rw-r--r--async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala b/async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala
index cdb45c3..7c2343d 100644
--- a/async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala
+++ b/async-http-client-backend/scalaz/src/main/scala/com/softwaremill/sttp/asynchttpclient/scalaz/AsyncHttpClientScalazBackend.scala
@@ -4,6 +4,7 @@ import java.nio.ByteBuffer
import com.softwaremill.sttp.asynchttpclient.AsyncHttpClientBackend
import com.softwaremill.sttp.{FollowRedirectsBackend, MonadAsyncError, SttpBackend, SttpBackendOptions}
+import io.netty.buffer.ByteBuf
import org.asynchttpclient.{AsyncHttpClient, AsyncHttpClientConfig, DefaultAsyncHttpClient}
import org.reactivestreams.Publisher
@@ -13,7 +14,8 @@ import scalaz.{-\/, \/-}
class AsyncHttpClientScalazBackend private (asyncHttpClient: AsyncHttpClient, closeClient: Boolean)
extends AsyncHttpClientBackend[Task, Nothing](asyncHttpClient, TaskMonad, 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")