aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/scala/xyz/driver/core/rest.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala
index aa2a75e..639eb05 100644
--- a/src/main/scala/xyz/driver/core/rest.scala
+++ b/src/main/scala/xyz/driver/core/rest.scala
@@ -5,7 +5,6 @@ import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.headers.{HttpChallenges, RawHeader}
import akka.http.scaladsl.server.AuthenticationFailedRejection.CredentialsRejected
-import akka.http.scaladsl.server.Directive0
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.http.scaladsl.unmarshalling.Unmarshaller
import akka.stream.ActorMaterializer
@@ -297,7 +296,10 @@ package rest {
} else if (response.status.isFailure()) {
throw new Exception(s"Http status is failure ${response.status}")
} else {
- Unmarshal(response.entity)
+ val entity = response.entity
+ // See https://github.com/akka/akka/issues/19538
+ entity.toStrict(5000L, materializer)
+ Unmarshal(entity)
}
}
}