Skip to content

Commit

Permalink
deprecatre req and add streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Sep 19, 2024
1 parent 70cc876 commit ae1534c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zio-http/shared/src/main/scala/zio/http/ZClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final case class ZClient[-Env, ReqEnv, -In, +Err, +Out](
driver: ZClient.Driver[Env, ReqEnv, Err],
) extends HeaderOps[ZClient[Env, ReqEnv, In, Err, Out]] { self =>
def apply(request: Request)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & ReqEnv, Err, Out] =
self.batched(request)
self.request(request)

override def updateHeaders(update: Headers => Headers)(implicit trace: Trace): ZClient[Env, ReqEnv, In, Err, Out] =
copy(headers = update(headers))
Expand Down Expand Up @@ -302,7 +302,7 @@ object ZClient extends ZClientPlatformSpecific {
* memory, allowing to stream response bodies
*/
def batched(request: Request)(implicit trace: Trace): ZIO[Client, Throwable, Response] =
ZIO.serviceWithZIO[Client](_.batched.batched(request))
ZIO.serviceWithZIO[Client](_.batched(request))

def fromDriver[Env, ReqEnv, Err](driver: Driver[Env, ReqEnv, Err]): ZClient[Env, ReqEnv, Body, Err, Response] =
ZClient(
Expand Down

0 comments on commit ae1534c

Please sign in to comment.