aboutsummaryrefslogtreecommitdiff
path: root/tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala')
-rw-r--r--tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala b/tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala
index ab77753..95a8bed 100644
--- a/tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala
+++ b/tests/src/test/scala/com/softwaremill/sttp/StreamingTests.scala
@@ -8,7 +8,6 @@ import com.softwaremill.sttp.akkahttp.AkkaHttpSttpHandler
import com.typesafe.scalalogging.StrictLogging
import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers}
import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures}
-import com.softwaremill.sttp.akkahttp._
class StreamingTests
extends FlatSpec
@@ -42,8 +41,8 @@ class StreamingTests
"Akka HTTP" should "stream request body" in {
val response = sttp
.post(uri"$endpoint/echo")
- .body(Source.single(ByteString(body)))
- .send(responseAsString)
+ .streamBody(Source.single(ByteString(body)))
+ .send()
.futureValue
response.body should be(body)
@@ -53,7 +52,8 @@ class StreamingTests
val response = sttp
.post(uri"$endpoint/echo")
.body(body)
- .send(responseAsStream[Source[ByteString, Any]])
+ .response(asStream[Source[ByteString, Any]])
+ .send()
.futureValue
val responseBody = response.body.runReduce(_ ++ _).futureValue.utf8String