ZClient

zio.http.ZClient
See theZClient companion object
final case class ZClient[-Env, -In, +Err, +Out](version: Version, url: URL, headers: Headers, sslConfig: Option[ClientSSLConfig], proxy: Option[Proxy], bodyEncoder: BodyEncoder[Env, Err, In], bodyDecoder: BodyDecoder[Env, Err, Out], driver: Driver[Env, Err])

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait HeaderChecks[ZClient[Env, In, Err, Out]]
trait HeaderModifier[ZClient[Env, In, Err, Out]]
class Object
trait Matchable
class Any
Show all
Self type
ZClient[Env, In, Err, Out]

Members list

Value members

Concrete methods

def @@[LowerEnv <: UpperEnv, UpperEnv <: Env, LowerIn <: UpperIn, UpperIn <: In, LowerErr >: Err, UpperErr >: LowerErr, LowerOut >: Out, UpperOut >: LowerOut](aspect: ZClientAspect[LowerEnv, UpperEnv, LowerIn, UpperIn, LowerErr, UpperErr, LowerOut, UpperOut]): ZClient[UpperEnv, UpperIn, LowerErr, LowerOut]

Applies the specified client aspect, which can modify the execution of this client.

Applies the specified client aspect, which can modify the execution of this client.

Attributes

def addLeadingSlash: ZClient[Env, In, Err, Out]
def addPath(path: String): ZClient[Env, In, Err, Out]
def addPath(path: Path): ZClient[Env, In, Err, Out]
def addQueryParam(key: String, value: String): ZClient[Env, In, Err, Out]
def addQueryParams(params: QueryParams): ZClient[Env, In, Err, Out]
def addTrailingSlash: ZClient[Env, In, Err, Out]
def addUrl(url: URL): ZClient[Env, In, Err, Out]
def apply(request: Request)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def contramap[In2](f: In2 => In)(implicit trace: Trace): ZClient[Env, In2, Err, Out]
def contramapZIO[Env1 <: Env, Err1 >: Err, In2](f: In2 => ZIO[Env1, Err1, In]): ZClient[Env1, In2, Err1, Out]
def delete(suffix: String)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def dieOn(f: Err => Boolean)(implicit ev1: IsSubtypeOfError[Err, Throwable], ev2: CanFail[Err], trace: Trace): ZClient[Env, In, Err, Out]
def disableStreaming(implicit ev: Err <:< Throwable, trace: Trace): ZClient[Env, In, Throwable, Out]
def get(suffix: String)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def head(suffix: String)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def host(host: String): ZClient[Env, In, Err, Out]
def map[Out2](f: Out => Out2)(implicit trace: Trace): ZClient[Env, In, Err, Out2]
def mapError[Err2](f: Err => Err2): ZClient[Env, In, Err2, Out]
def mapZIO[Env1 <: Env, Err1 >: Err, Out2](f: Out => ZIO[Env1, Err1, Out2]): ZClient[Env1, In, Err1, Out2]
def patch(suffix: String)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def path(path: String): ZClient[Env, In, Err, Out]
def path(path: Path): ZClient[Env, In, Err, Out]
def port(port: Int): ZClient[Env, In, Err, Out]
def post(suffix: String)(body: In)(implicit trace: Trace): ZIO[Env & Scope, Err, Out]
def proxy(proxy: Proxy): ZClient[Env, In, Err, Out]
def put(suffix: String)(body: In)(implicit trace: Trace): ZIO[Env & Scope, Err, Out]
def refineOrDie[Err2](pf: PartialFunction[Err, Err2])(implicit ev1: IsSubtypeOfError[Err, Throwable], ev2: CanFail[Err], trace: Trace): ZClient[Env, In, Err2, Out]
def request(request: Request)(implicit ev: Body <:< In, trace: Trace): ZIO[Env & Scope, Err, Out]
def request(method: Method, suffix: String)(body: In)(implicit trace: Trace): ZIO[Env & Scope, Err, Out]
def retry[Env1 <: Env](policy: Schedule[Env1, Err, Any]): ZClient[Env1, In, Err, Out]
def scheme(scheme: Scheme): ZClient[Env, In, Err, Out]
def socket[Env1 <: Env](app: WebSocketApp[Env1])(implicit trace: Trace): ZIO[Env1 & Scope, Err, Out]
def ssl(ssl: ClientSSLConfig): ZClient[Env, In, Err, Out]
def transform[Env2, In2, Err2, Out2](bodyEncoder: BodyEncoder[Env2, Err2, In2], bodyDecoder: BodyDecoder[Env2, Err2, Out2], driver: Driver[Env2, Err2]): ZClient[Env2, In2, Err2, Out2]
override def updateHeaders(update: Headers => Headers)(implicit trace: Trace): ZClient[Env, In, Err, Out]

Updates the current Headers with new one, using the provided update function passed.

Updates the current Headers with new one, using the provided update function passed.

Attributes

Definition Classes
def uri(uri: URI): ZClient[Env, In, Err, Out]
def url(url: URL): ZClient[Env, In, Err, Out]

Inherited methods

final def addHeader(name: CharSequence, value: CharSequence): A

Attributes

Inherited from:
HeaderModifier
final def addHeader(header: Header): A

Attributes

Inherited from:
HeaderModifier
final def addHeaders(headers: Headers): A

Attributes

Inherited from:
HeaderModifier
final def hasContentType(value: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasFormMultipartContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasFormUrlencodedContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(header: Header): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(headerType: HeaderType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(name: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasJsonContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasMediaType(mediaType: MediaType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasTextPlainContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasXhtmlXmlContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasXmlContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def header(headerType: HeaderType): Option[HeaderValue]

Gets a header or returns None if the header was not present or it could not be parsed

Gets a header or returns None if the header was not present or it could not be parsed

Attributes

Inherited from:
HeaderGetters
final def headerOrFail(headerType: HeaderType): Option[Either[String, HeaderValue]]

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Attributes

Inherited from:
HeaderGetters
final def headers(headerType: HeaderType): Chunk[HeaderValue]

Attributes

Inherited from:
HeaderGetters
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def rawHeader(headerType: HeaderType): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
final def rawHeader(name: CharSequence): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
final def removeHeader(name: String): A

Attributes

Inherited from:
HeaderModifier
final def removeHeader(headerType: HeaderType): A

Attributes

Inherited from:
HeaderModifier
final def removeHeaders(headers: Set[String]): A

Attributes

Inherited from:
HeaderModifier
final def setHeaders(headers: Headers): A

Attributes

Inherited from:
HeaderModifier