From 3bd27fd4e2658bd54008a2e05605eab964ac6019 Mon Sep 17 00:00:00 2001 From: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Date: Wed, 26 Jun 2024 01:26:32 +0530 Subject: [PATCH 1/2] Update EndpointClient.scala --- .../main/scala/zio/http/endpoint/internal/EndpointClient.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/zio-http/shared/src/main/scala/zio/http/endpoint/internal/EndpointClient.scala b/zio-http/shared/src/main/scala/zio/http/endpoint/internal/EndpointClient.scala index e728d90b4d..9f30b2b7fb 100644 --- a/zio-http/shared/src/main/scala/zio/http/endpoint/internal/EndpointClient.scala +++ b/zio-http/shared/src/main/scala/zio/http/endpoint/internal/EndpointClient.scala @@ -26,7 +26,6 @@ import zio.http.endpoint._ private[endpoint] final case class EndpointClient[P, I, E, O, M <: EndpointMiddleware]( endpointRoot: URL, endpoint: Endpoint[P, I, E, O, M], - codecMapping: Map[Int, Codec[Response, Throwable, E]] ) { def execute(client: Client, invocation: Invocation[P, I, E, O, M])( mi: invocation.middleware.In, From 063ddf261915567e85c84c32d2c01de38d08a3eb Mon Sep 17 00:00:00 2001 From: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Date: Wed, 26 Jun 2024 01:32:18 +0530 Subject: [PATCH 2/2] Update NettyBodyWriter.scala --- .../src/main/scala/zio/http/netty/NettyBodyWriter.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zio-http/jvm/src/main/scala/zio/http/netty/NettyBodyWriter.scala b/zio-http/jvm/src/main/scala/zio/http/netty/NettyBodyWriter.scala index 852dd2256f..5cc2f9e548 100644 --- a/zio-http/jvm/src/main/scala/zio/http/netty/NettyBodyWriter.scala +++ b/zio-http/jvm/src/main/scala/zio/http/netty/NettyBodyWriter.scala @@ -31,6 +31,8 @@ import zio.http.netty.NettyBody.{AsciiStringBody, AsyncBody, UnsafeAsync} import io.netty.buffer.Unpooled import io.netty.channel._ import io.netty.handler.codec.http.{DefaultHttpContent, LastHttpContent} +import io.netty.handler.stream.ChunkedNioFile +import zio.http.{ServerSentEvent, MediaType} object NettyBodyWriter { @@ -56,7 +58,7 @@ object NettyBodyWriter { def writeServerSentEvent(sse: ServerSentEvent, isLast: Boolean) = { val data = sse.encode - val buf = Unpooled.wrappedBuffer(data.getBytes()) + val buf = Unpooled.wrappedBuffer(data.getBytes()) if (isLast) { ctx.write(buf) ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT) @@ -144,6 +146,5 @@ object NettyBodyWriter { } } -case class ServerSentEventBody(sse: ServerSentEvent, knownContentLength: Option[Long], mediaType: MediaType) extends Body - - +case class ServerSentEventBody(sse: ServerSentEvent, knownContentLength: Option[Long], mediaType: MediaType) + extends Body