zio.http

package zio.http

Members list

Concise view

Type members

Classlikes

sealed trait Body

Holds Body that needs to be written on the HttpChannel

Holds Body that needs to be written on the HttpChannel

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Body

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Body.type
trait Channel[-A]

An immutable and type-safe representation of one or more netty channels. A represents the type of messages that can be written on the channel.

An immutable and type-safe representation of one or more netty channels. A represents the type of messages that can be written on the channel.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ChannelNetty[A]
final case class ChannelEvent[-A, +B](channel: Channel[A], event: Event[B])

Immutable and type-safe representation of events that are triggered on a netty channel. A represents the inbound message type and B represents the outbound message type that's allowed on the channel.

Immutable and type-safe representation of events that are triggered on a netty channel. A represents the inbound message type and B represents the outbound message type that's allowed on the channel.

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ChannelNetty[-A](channel: Channel, convert: A => Any) extends Channel[A]

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Channel[A]
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class ClientConfig(socketApp: Option[SocketApp[Any]], ssl: Option[ClientSSLConfig], proxy: Option[Proxy], channelType: ChannelType, nThreads: Int, useAggregator: Boolean, connectionPool: ConnectionPoolConfig, maxHeaderSize: Int, requestDecompression: Decompression, localAddress: Option[InetSocketAddress]) extends Config

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
trait Config
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait ClientSSLConfig

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait ConnectionPool[Connection]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Disabled.type
class Dynamic
class Fixed

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait CookieDecoder[A]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait CookieEncoder[A]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Decompression

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object No.type
object NonStrict.type
object Strict.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Driver

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
trait Extractor

Path is an immutable representation of a urls path. Internally it stores each element of a path in a sequence of Segment. This allows for powerful compositional APIs.

Path is an immutable representation of a urls path. Internally it stores each element of a path in a sequence of Segment. This allows for powerful compositional APIs.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait Handler[-R, +Err, -In, +Out]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Handler[R, Err, In, Out]
object Handler

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Handler.type
trait HandlerAspect[-R, +Err, +AIn, -AOut, -BIn, +BOut]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HandlerMiddleware[R, Err, AIn, AOut, BIn, BOut]
Self type
HandlerAspect[R, Err, AIn, AOut, BIn, BOut]

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait HandlerMiddleware[-R, +Err, +AIn, -AOut, -BIn <: AIn, +BOut] extends HandlerAspect[R, Err, AIn, AOut, BIn, BOut] with Middleware[R, Err, AIn, AOut, BIn, BOut]

Attributes

Graph
Supertypes
trait Middleware[R, Err, AIn, AOut, BIn, BOut]
trait HandlerAspect[R, Err, AIn, AOut, BIn, BOut]
class Object
trait Matchable
class Any
Self type
HandlerMiddleware[R, Err, AIn, AOut, BIn, BOut]
sealed trait Http[-R, +Err, -In, +Out]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Empty.type
trait Route[R, Err, In, Out]
class Static[R, Err, In, Out]
Self type
Http[R, Err, In, Out]
object Http

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Http.type
case class IntExtractor(int: Int) extends Extractor

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Extractor
class Object
trait Matchable
class Any
sealed trait IsMono[-AIn, +AOut, +BIn, -BOut]

IsMono is a type-constraint that is used by the middleware api for allowing some operators only when the following condition is met.

IsMono is a type-constraint that is used by the middleware api for allowing some operators only when the following condition is met.

Condition: Since a middleware takes in an Http and returns a new Http, IsMono, makes sure that the type parameters of the incoming Http and the ones for the outgoing Http is the same.

For Eg: IsMono will be defined for a middleware that looks as follows

val mid: Middleware[Any, Nothing, Request, Response, Request, Response]

This is because both the middleware is defined from (Request, Response) => (Request, Response). Consider another example:

val mid: Middleware[Any, Nothing, Request, Response, UserRequest, UserResponse]

In this case, the incoming and outgoing types are different viz. (Request, Response) => (UserRequest, UserResponse), hence there is no IsMono defined for such middlewares.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object IsMono.type
object IsMono extends IsMono[Any, Nothing, Nothing, Any]

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
trait IsMono[Any, Nothing, Nothing, Any]
class Object
trait Matchable
class Any
Self type
IsMono.type
trait Middleware[-R, +Err, +AIn, -AOut, -BIn, +BOut]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HandlerMiddleware[R, Err, AIn, AOut, BIn, BOut]
Self type
Middleware[R, Err, AIn, AOut, BIn, BOut]
object Middleware

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Patch

Models the set of operations that one would want to apply on a Response.

Models the set of operations that one would want to apply on a Response.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Combine
object Empty.type
class SetStatus
Self type
object Patch

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Patch.type
final case class Path

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
object Path

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Path.type
final case class Proxy(url: URL, credentials: Option[Credentials], headers: Headers)

Represents the connection to the forward proxy before running the request

Represents the connection to the forward proxy before running the request

Attributes

credentials:

credentials for the proxy server. Encodes credentials with basic auth and put under the 'proxy-authorization' header

headers:

headers for the request to the proxy server

url:

url address of the proxy server

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
object Proxy

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Proxy.type
final case class QueryParams extends Map[String, Chunk[String]]

Attributes

Companion:
object
Graph
Supertypes
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Request(body: Body, headers: Headers, method: Method, url: URL, version: Version, remoteAddress: Option[InetAddress])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
object Request

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Request.type
sealed trait Response

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Response

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Instead of using just String as path params, using the RouteDecoderModule we can extract and converted params into a specific type also.

Instead of using just String as path params, using the RouteDecoderModule we can extract and converted params into a specific type also.

Http.collect[Request] {
 case GET -> !! / "user" / int(id) => Response.text("User id requested: ${id}")
 case GET -> !! / "user" / name    => Response.text("User name requested: ${name}")
}

If the request looks like GET /user/100 then it would match the first case. This is because internally the id param can be decoded into an Int. If a request of the form GET /user/zio is made, in that case the second case is matched.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final case class SSLConfig(behaviour: HttpBehaviour, data: Data, provider: Provider)

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object SSLConfig

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Server

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Server

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Server.type
final case class ServerConfig(leakDetectionLevel: LeakDetectionLevel, sslConfig: Option[SSLConfig], address: InetSocketAddress, acceptContinue: Boolean, keepAlive: Boolean, consolidateFlush: Boolean, flowControl: Boolean, requestDecompression: Decompression, responseCompression: Option[ResponseCompressionConfig], objectAggregator: Int, channelType: ChannelType, nThreads: Int, maxHeaderSize: Int) extends Config

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
trait Config
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class URL(path: Path, kind: Location, queryParams: QueryParams, fragment: Option[Fragment])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
object URL

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
URL.type
trait ZClient[-Env, -In, +Err, +Out]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZClient[Env, In, Err, Out]
object ZClient

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZClient.type
trait ZClientAspect[+LowerEnv, -UpperEnv, +LowerIn, -UpperIn, +LowerErr, -UpperErr, +LowerOut, -UpperOut]

A ZClientAspect is capable on modifying some aspect of the execution of a client, such as metrics, tracing, encoding, decoding, or logging.

A ZClientAspect is capable on modifying some aspect of the execution of a client, such as metrics, tracing, encoding, decoding, or logging.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZClientAspect[LowerEnv, UpperEnv, LowerIn, UpperIn, LowerErr, UpperErr, LowerOut, UpperOut]

Inherited classlikes

object ->

Attributes

Inherited from:
RequestSyntax (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any
object /

Attributes

Inherited from:
PathSyntax (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any
object /:

Attributes

Inherited from:
PathSyntax (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any
abstract class RouteDecode[A](f: String => A)

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object boolean.type
object byte.type
object date.type
object double.type
object float.type
object int.type
object long.type
object short.type
object time.type
object uuid.type
object boolean extends RouteDecode[Boolean]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object byte extends RouteDecode[Byte]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object date extends RouteDecode[LocalDate]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class RouteDecode[LocalDate]
class Object
trait Matchable
class Any
object double extends RouteDecode[Double]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object float extends RouteDecode[Float]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object int extends RouteDecode[Int]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object long extends RouteDecode[Long]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object short extends RouteDecode[Short]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class Object
trait Matchable
class Any
object time extends RouteDecode[LocalDateTime]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class RouteDecode[LocalDateTime]
class Object
trait Matchable
class Any
object uuid extends RouteDecode[UUID]

Attributes

Inherited from:
RouteDecoderModule
Graph
Supertypes
class RouteDecode[UUID]
class Object
trait Matchable
class Any

Types

type App[-R] = HttpApp[R, Response]
type HttpApp[-R, +Err] = Http[R, Err, Request, Response]
type RHttpApp[-R] = HttpApp[R, Throwable]
type RequestHandler[-R, +Err] = Handler[R, Err, Request, Response]
type UHttp[-A, +B] = Http[Any, Nothing, A, B]
type UHttpApp = HttpApp[Any, Nothing]
type UMiddleware[+AIn, -AOut, -BIn, +BOut] = Middleware[Any, Nothing, AIn, AOut, BIn, BOut]

Value members

Concrete methods

def Client: ZClient.type

Inherited fields

val !!: Path

Attributes

Inherited from:
PathSyntax (hidden)
val ~~: Path

Attributes

Inherited from:
PathSyntax (hidden)