From 6ee6426c9b7b46fd51aa39bb9cf371827210651e Mon Sep 17 00:00:00 2001 From: FabioPinheiro Date: Thu, 19 Sep 2024 23:38:36 +0100 Subject: [PATCH] Update zio-http to 3.0.1 --- build.sbt | 2 +- .../scala/fmgp/did/framework/TransportDIDCommOverHTTP.scala | 2 +- .../jvm/src/main/scala/fmgp/did/method/web/DIDWebResolver.scala | 2 +- .../jvm/src/main/scala/fmgp/did/uniresolver/Uniresolver.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 11837b95..149e86b3 100644 --- a/build.sbt +++ b/build.sbt @@ -143,7 +143,7 @@ lazy val V = new { val zio = "2.1.7" val zioJson = "0.6.2" val zioMunitTest = "0.3.0" - val zioHttp = "3.0.0-RC9" // FIXES CORS https://github.com/zio/zio-http/pull/2490 + val zioHttp = "3.0.1" // FIXES CORS https://github.com/zio/zio-http/pull/2490 val zioPrelude = "1.0.0-RC21" // https://mvnrepository.com/artifact/io.github.cquiroz/scala-java-time diff --git a/did-framework/jvm/src/main/scala/fmgp/did/framework/TransportDIDCommOverHTTP.scala b/did-framework/jvm/src/main/scala/fmgp/did/framework/TransportDIDCommOverHTTP.scala index 0cfba937..a3ef546b 100644 --- a/did-framework/jvm/src/main/scala/fmgp/did/framework/TransportDIDCommOverHTTP.scala +++ b/did-framework/jvm/src/main/scala/fmgp/did/framework/TransportDIDCommOverHTTP.scala @@ -26,7 +26,7 @@ class TransportDIDCommOverHTTP( case _: EncryptedMessage => MediaTypes.ENCRYPTED.pipe(e => Header.ContentType(MediaType(e.mainType, e.subType))) for { res <- Client - .request( + .batched( // Shound we use .batched() or .streaming()testAll Request .post(path = destination, body = Body.fromCharSequence((msg: Message).toJson)) .setHeaders(Headers(Seq(contentTypeHeader))) diff --git a/did-method-web/jvm/src/main/scala/fmgp/did/method/web/DIDWebResolver.scala b/did-method-web/jvm/src/main/scala/fmgp/did/method/web/DIDWebResolver.scala index 53d0f08e..37e94f59 100644 --- a/did-method-web/jvm/src/main/scala/fmgp/did/method/web/DIDWebResolver.scala +++ b/did-method-web/jvm/src/main/scala/fmgp/did/method/web/DIDWebResolver.scala @@ -24,7 +24,7 @@ case class DIDWebResolver(client: Client, scope: Scope) extends Resolver { val web = DIDWeb(did.specificId) for { res <- Client - .request(Request.get(path = web.url)) + .batched(Request.get(path = web.url)) .provideEnvironment(ZEnvironment(client) ++ ZEnvironment(scope)) .mapError(ex => DIDresolutionFail.fromThrowable(ex)) _ = res diff --git a/did-uniresolver/jvm/src/main/scala/fmgp/did/uniresolver/Uniresolver.scala b/did-uniresolver/jvm/src/main/scala/fmgp/did/uniresolver/Uniresolver.scala index 9ce2b352..3789f8b8 100644 --- a/did-uniresolver/jvm/src/main/scala/fmgp/did/uniresolver/Uniresolver.scala +++ b/did-uniresolver/jvm/src/main/scala/fmgp/did/uniresolver/Uniresolver.scala @@ -27,7 +27,7 @@ case class Uniresolver(uniresolverServer: String, client: Client, scope: Scope) // else for { res <- Client - .request(Request.get(path = uniresolverServer + did)) + .batched(Request.get(path = uniresolverServer + did)) .provideEnvironment(ZEnvironment(client) ++ ZEnvironment(scope)) .mapError(ex => DIDresolutionFail.fromThrowable(ex)) data <- res.body.asString