!htp #16190 refactor and improve marshalling infrastructure, get rid of Marshallers abstraction altogether
Also improve Unmarshalling infrastructure once more.
This commit is contained in:
parent
5b126b6d8b
commit
d65fe4e04e
17 changed files with 250 additions and 198 deletions
|
|
@ -16,7 +16,7 @@ import akka.stream.FlowMaterializer
|
|||
import scala.util.Try
|
||||
|
||||
trait MarshallingTestUtils {
|
||||
def marshal[T: ToEntityMarshallers](value: T)(implicit ec: ExecutionContext, mat: FlowMaterializer): HttpEntity.Strict =
|
||||
def marshal[T: ToEntityMarshaller](value: T)(implicit ec: ExecutionContext, mat: FlowMaterializer): HttpEntity.Strict =
|
||||
Await.result(Marshal(value).to[HttpEntity].flatMap(_.toStrict(1.second)), 1.second)
|
||||
|
||||
def unmarshalValue[T: FromEntityUnmarshaller](entity: HttpEntity)(implicit ec: ExecutionContext, mat: FlowMaterializer): T =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue