object ZClient extends ZClientPlatformSpecific with Serializable
- Alphabetic
- By Inheritance
- ZClient
- Serializable
- ZClientPlatformSpecific
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait BodyDecoder[-Env, +Err, +Out] extends AnyRef
- trait BodyEncoder[-Env, +Err, -In] extends AnyRef
- final case class Config(ssl: Option[ClientSSLConfig], proxy: Option[Proxy], connectionPool: ConnectionPoolConfig, maxInitialLineLength: Int, maxHeaderSize: Int, requestDecompression: Decompression, localAddress: Option[InetSocketAddress], addUserAgentHeader: Boolean, webSocketConfig: WebSocketConfig, idleTimeout: Option[zio.Duration], connectionTimeout: Option[zio.Duration]) extends Product with Serializable
- trait Driver[-Env, ReqEnv, +Err] extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def batched(request: Request)(implicit trace: Trace): ZIO[Client, Throwable, Response]
Executes an HTTP request and extracts the response
Executes an HTTP request and extracts the response
NOTE: This method materializes the full response into memory. If the response is streaming, it will await for it to be fully collected before resuming.
- See also
streaming for a variant that doesn't materialize the response body in memory, allowing to stream response bodies
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def configured(path: NonEmptyChunk[String] = NonEmptyChunk("zio", "http", "client"))(implicit trace: Trace): ZLayer[DnsResolver, Throwable, Client]
- Definition Classes
- ZClientPlatformSpecific
- lazy val customized: ZLayer[Config with ClientDriver with DnsResolver, Throwable, Client]
- Definition Classes
- ZClientPlatformSpecific
- lazy val default: ZLayer[Any, Throwable, Client]
- Definition Classes
- ZClientPlatformSpecific
- lazy val defaultUAHeader: UserAgent
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromDriver[Env, ReqEnv, Err](driver: Driver[Env, ReqEnv, Err]): ZClient[Env, ReqEnv, Body, Err, Response]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- lazy val live: ZLayer[Config with NettyConfig with DnsResolver, Throwable, Client]
- Definition Classes
- ZClientPlatformSpecific
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def socket[R](socketApp: WebSocketApp[R])(implicit trace: Trace): ZIO[zio.&[R with Client, Scope], Throwable, Response]
- def streaming(request: Request)(implicit trace: Trace): ZIO[zio.&[Client, Scope], Throwable, Response]
Executes an HTTP request and extracts the response.
Executes an HTTP request and extracts the response.
It is the responsibility of the user to ensure that the resources associated with the request are properly finalized via the returned
Scope.NOTE: The
Scopemust be closed after the body has been collected.- See also
batched for a variant that doesn't require manual handling of the request's resources (i.e.,
Scope)
- def streamingWith[R, A](request: Request)(f: (Response) => ZStream[R, Throwable, A])(implicit trace: Trace): ZStream[zio.&[R, Client], Throwable, A]
Executes an HTTP request, and transforms the response to a
ZStreamusing the provided function.Executes an HTTP request, and transforms the response to a
ZStreamusing the provided function. The resources associated with this request will be automatically cleaned up when theZStreamterminates.This method does not materialize the response body in memory, so it will resume as soon as the response is received, and it is safe to use with large response bodies
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object BodyDecoder
- object BodyEncoder
- object Config extends Serializable
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def request(request: Request)(implicit trace: Trace): ZIO[zio.&[Client, Scope], Throwable, Response]
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Use
batchedorstreaminginstead