ZClient

zio.http.ZClient
See theZClient companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type
ZClient.type

Members list

Type members

Classlikes

object BodyDecoder

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait BodyDecoder[-Env, +Err, +Out]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
BodyDecoder[Env, Err, Out]
object BodyEncoder

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait BodyEncoder[-Env, +Err, -In]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
BodyEncoder[Env, Err, In]
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[Duration], connectionTimeout: Option[Duration])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
object Config

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Config.type
trait Driver[-Env, ReqEnv, +Err]

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Driver[Env, ReqEnv, Err]

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

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.

Attributes

See also

streaming for a variant that doesn't materialize the response body in memory, allowing to stream response bodies

def fromDriver[Env, ReqEnv, Err](driver: Driver[Env, ReqEnv, Err]): ZClient[Env, ReqEnv, Body, Err, Response]
def socket[R](socketApp: WebSocketApp[R])(implicit trace: Trace): ZIO[R & Client & Scope, Throwable, Response]
def streaming(request: Request)(implicit trace: Trace): 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 Scope must be closed ''after'' the body has been collected.

Attributes

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[R & Client, Throwable, A]

Executes an HTTP request, and transforms the response to a ZStream using the provided function. The resources associated with this request will be automatically cleaned up when the ZStream terminates.

Executes an HTTP request, and transforms the response to a ZStream using the provided function. The resources associated with this request will be automatically cleaned up when the ZStream terminates.

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

Attributes

Deprecated methods

def request(request: Request)(implicit trace: Trace): ZIO[Client & Scope, Throwable, Response]

Attributes

Deprecated
[Since version 3.0.0] Use `batched` or `streaming` instead

Inherited methods

def configured(path: NonEmptyChunk[String] = ...)(implicit trace: Trace): ZLayer[DnsResolver, Throwable, Client]

Attributes

Inherited from:
ZClientPlatformSpecific

Attributes

Inherited from:
ZClientPlatformSpecific

Concrete fields