p

zio

http

package http

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. http
  2. MdInterpolator
  3. UrlInterpolator
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Body extends AnyRef

    Represents the body of a request or response.

    Represents the body of a request or response. The body can be a fixed chunk of bytes, a stream of bytes, or form data, or any type that can be encoded into such representations (such as textual data using some character encoding, the contents of files, JSON, etc.).

  2. final case class Boundary(id: String, charset: Charset) extends Product with Serializable

    A multipart boundary, which consists of both the boundary and its charset.

  3. trait Channel[-In, +Out] extends AnyRef

    A Channel is an asynchronous communication channel that supports receiving messages of type In and sending messages of type Out.

  4. sealed trait ChannelEvent[+A] extends AnyRef

    Immutable and type-safe representation of events that are triggered on a netty channel.

    Immutable and type-safe representation of events that are triggered on a netty channel. A represents the message type.

  5. type Client = ZClient[Any, Body, Throwable, Response]
  6. sealed trait ClientAuth extends AnyRef
  7. trait ClientDriver extends AnyRef
  8. sealed trait ClientSSLCertConfig extends AnyRef
  9. sealed trait ClientSSLConfig extends AnyRef
  10. trait ComposeLowPriorityImplicits extends AnyRef
  11. trait ConnectionPool[Connection] extends AnyRef
  12. sealed trait ConnectionPoolConfig extends AnyRef
  13. sealed trait Cookie extends AnyRef

    Cookie is an immutable and type-safe representation of an HTTP cookie.

    Cookie is an immutable and type-safe representation of an HTTP cookie. There are two types of cookies: request cookies and response cookies. These can be created with the constructors in the companion object of Cookie.

  14. final case class Credentials(uname: String, upassword: Secret) extends Product with Serializable
  15. sealed trait Decompression extends AnyRef
  16. trait DnsResolver extends AnyRef
  17. trait Driver extends AnyRef
  18. trait DriverPlatformSpecific extends AnyRef
    Annotations
    @nowarn()
  19. sealed trait Flash[+A] extends AnyRef

    Flash represents a flash value that one can retrieve from the flash scope.

    Flash represents a flash value that one can retrieve from the flash scope.

    The flash scope consists of a serialized and url-encoded json object built with zio-schema.

  20. final case class Form(formData: Chunk[FormField]) extends Product with Serializable

    Represents a form that can be either multipart or url encoded.

  21. sealed trait FormDecodingError extends Exception

    Represents a form decoding error.

  22. sealed trait FormField extends AnyRef

    Represents a field in a form.

    Represents a field in a form. Every field contains name, content type (perhaps just plaintext), type-specific content, and an optional filename.

  23. sealed trait Handler[-R, +Err, -In, +Out] extends AnyRef
  24. final case class HandlerAspect[-Env, +CtxOut](protocol: ProtocolStack[Env, Request, (Request, CtxOut), Response, Response]) extends Middleware[Env] with Product with Serializable

    A zio.http.HandlerAspect is a kind of zio.http.ProtocolStack that is specialized to transform a handler's incoming requests and outgoing responses.

    A zio.http.HandlerAspect is a kind of zio.http.ProtocolStack that is specialized to transform a handler's incoming requests and outgoing responses. Each layer in the stack corresponds to a separate transformation.

    Layers may incorporate layer-specific information into a generic type parameter, referred to as middleware context, which composes using tupling.

    Layers may also be stateful at the level of each transformation application. So, for example, a layer that is timing request durations may capture the start time of the request in the incoming interceptor, and pass this state to the outgoing interceptor, which can then compute the duration.

    zio.http.HandlerAspect is more than just a wrapper around zio.http.ProtocolStack, as its concatenation operator has been specialized to entuple contexts, so that each layer may only add context to the contextual output.

  25. trait HandlerPlatformSpecific extends AnyRef
  26. trait HandlerVersionSpecific extends AnyRef
  27. sealed trait Header extends AnyRef
  28. sealed trait Headers extends HeaderOps[Headers] with Iterable[Header]

    Represents an immutable collection of headers.

    Represents an immutable collection of headers. It extends HeaderExtensions and has a ton of powerful operators that can be used to add, remove and modify headers.

    NOTE: Generic operators that are not specific to Headers should not be defined here. A better place would be one of the traits extended by HeaderExtension.

  29. trait MdInterpolator extends AnyRef
  30. implicit class MdInterpolatorHelper extends AnyRef
    Definition Classes
    MdInterpolator
  31. final case class MediaType(mainType: String, subType: String, compressible: Boolean = false, binary: Boolean = false, fileExtensions: List[String] = Nil, extensions: Map[String, String] = Map.empty, parameters: Map[String, String] = Map.empty) extends Product with Serializable
  32. sealed trait Method extends AnyRef

    Represents an HTTP method, such as GET, PUT, POST, or DELETE.

  33. trait Middleware[-UpperEnv] extends AnyRef
    Annotations
    @nowarn()
  34. final case class Path extends Product with Serializable

    Path is an immutable representation of the path of a URL.

    Path is an immutable representation of the path of a URL. Internally it stores each element of a path in a sequence of text, together with flags on whether there are leading and trailing slashes in the path. This allows for a combination of precision and performance and supports a rich API.

  35. sealed trait ProtocolStack[-Env, -IncomingIn, +IncomingOut, -OutgoingIn, +OutgoingOut] extends AnyRef

    A zio.http.ProtocolStack represents a linear stack of protocol layers, each of which can statefully transform incoming and outgoing values of some handler.

    A zio.http.ProtocolStack represents a linear stack of protocol layers, each of which can statefully transform incoming and outgoing values of some handler.

    Protocol stacks can be thought of as a formal model of the process of transforming one handler into another handler.

    Protocol stacks are designed to support precise semantics around error handling. In particular, if a layer successfully processes an incoming value of a handler, then that same layer will also have a chance to process the outgoing value of the handler. This requirement constrains the ways in which layers can fail, and the types of handlers they may be applied to.

    In particular, protocol stacks can be applied to handlers that fail with the same type as their output type. This guarantees that should a handler fail, it will still produce an outgoing value that can be processed by all the layers that successfully transformed the incoming value.

    Further, a layer may only fail while it processes an incoming value, and it may only value with the same type as its outgoing value. This guarantees that should a layer fail, it will still produce an outgoing value that can be processed by all the earlier layers that successfully transformed the incoming value.

    In a way, the entire design of protocol stacks is geared at ensuring layers that successfully process incoming values will also have a chance to process outgoing values.

    The only composition operator on protocol stacks is ++, which simply chains two stacks together. This operator is associative and has an identity (which is the protocol stack that neither transforms incoming nor outgoing values, and which acts as an identity when used to transform handlers).

  36. final case class Proxy(url: URL, credentials: Option[Credentials] = None, headers: Headers = Headers.empty) extends Product with Serializable

    Represents the connection to the forward proxy before running the request

  37. trait QueryParams extends QueryOps[QueryParams]

    A collection of query parameters.

  38. sealed trait QueryParamsError extends Exception with NoStackTrace
  39. final case class Request(version: Version = Version.Default, method: Method = Method.ANY, url: URL = URL.empty, headers: Headers = Headers.empty, body: Body = Body.empty, remoteAddress: Option[InetAddress] = None, remoteCertificate: Option[Certificate] = None) extends HeaderOps[Request] with QueryOps[Request] with Product with Serializable
  40. type RequestHandler[-R, +Err] = Handler[R, Err, Request, Response]
  41. final class RequestHandlerInput[A, I] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  42. final case class Response(status: Status = Status.Ok, headers: Headers = Headers.empty, body: Body = Body.empty) extends HeaderOps[Response] with Product with Serializable
  43. sealed trait Route[-Env, +Err] extends AnyRef
  44. final case class RoutePattern[A](method: Method, pathCodec: PathCodec[A]) extends Product with Serializable

    A pattern for matching routes that examines both HTTP method and path.

    A pattern for matching routes that examines both HTTP method and path. In addition to specifying a method, patterns contain segment patterns, which are sequences of literals, integers, longs, and other segment types.

    Typically, your entry point constructor for a route pattern would be zio.http.Method:

    import zio.http.Method
    import zio.http.codec.SegmentCodec._
    
    val pattern = Method.GET / "users" / int("user-id") / "posts" / string("post-id")

    However, you can use the convenience constructors in RoutePattern, such as RoutePattern.GET.

  45. final case class Routes[-Env, +Err](routes: Chunk[Route[Env, Err]]) extends Product with Serializable

    An HTTP application is a collection of routes, all of whose errors have been handled through conversion into HTTP responses.

    An HTTP application is a collection of routes, all of whose errors have been handled through conversion into HTTP responses.

    HTTP applications can be installed into a zio.http.Server, which is capable of using them to serve requests.

  46. trait RoutesCompanionVersionSpecific extends AnyRef
  47. final case class SSLConfig(behaviour: HttpBehaviour, data: Data, provider: Provider, clientAuth: Option[ClientAuth] = None, includeClientCert: Boolean = false) extends Product with Serializable
  48. sealed trait Scheme extends AnyRef
  49. trait Server extends AnyRef

    Represents a server, which is capable of serving zero or more HTTP applications.

  50. trait ServerPlatformSpecific extends AnyRef
    Annotations
    @nowarn()
  51. final case class ServerSentEvent(data: String, eventType: Option[String] = None, id: Option[String] = None, retry: Option[Int] = None) extends Product with Serializable

    Server-Sent Event (SSE) as defined by https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

    Server-Sent Event (SSE) as defined by https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

    data

    data, may span multiple lines

    eventType

    optional type, must not contain \n or \r

    id

    optional id, must not contain \n or \r

    retry

    optional reconnection delay in milliseconds

  52. final case class SocketDecoder(maxFramePayloadLength: Int = 65536, expectMaskedFrames: Boolean = true, allowMaskMismatch: Boolean = false, allowExtensions: Boolean = false, closeOnProtocolViolation: Boolean = true, withUTF8Validator: Boolean = true) extends Product with Serializable

    Frame decoder configuration

  53. sealed trait Status extends Product with Serializable
  54. final case class StreamingForm(source: ZStream[Any, Throwable, Byte], boundary: Boundary, bufferSize: Int = 8192) extends Product with Serializable
  55. trait ToHandler[H] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  56. final case class URL(path: Path, kind: Location = URL.Location.Relative, queryParams: QueryParams = QueryParams.empty, fragment: Option[Fragment] = None) extends URLPlatformSpecific with QueryOps[URL] with Product with Serializable
  57. trait URLPlatformSpecific extends AnyRef
  58. trait UrlInterpolator extends AnyRef
  59. implicit class UrlInterpolatorHelper extends AnyRef
    Definition Classes
    UrlInterpolator
  60. sealed trait Version extends AnyRef
  61. final case class WebSocketApp[-R](handler: Handler[R, Throwable, WebSocketChannel, Any], customConfig: Option[WebSocketConfig]) extends Product with Serializable
  62. type WebSocketChannel = Channel[WebSocketChannelEvent, WebSocketChannelEvent]

    A channel that allows websocket frames to be written to it.

  63. type WebSocketChannelEvent = ChannelEvent[WebSocketFrame]

    A channel that allows websocket frames to be read and write to it.

  64. final case class WebSocketConfig(subprotocols: Option[String] = None, handshakeTimeoutMillis: Long = 10000L, forceCloseTimeoutMillis: Long = -1L, handleCloseFrames: Boolean = true, sendCloseFrame: CloseStatus = ..., dropPongFrames: Boolean = true, decoderConfig: SocketDecoder = SocketDecoder.default) extends Product with Serializable

    Server side websocket configuration

  65. sealed trait WebSocketFrame extends Product with Serializable
  66. trait WithContext[C] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  67. 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: ZClient.Driver[Env, Err]) extends HeaderOps[ZClient[Env, In, Err, Out]] with Product with Serializable
  68. trait ZClientAspect[+LowerEnv, -UpperEnv, +LowerIn, -UpperIn, +LowerErr, -UpperErr, +LowerOut, -UpperOut] extends AnyRef

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

  69. trait ZClientPlatformSpecific extends AnyRef
  70. trait ZCompose[+LeftLower, -LeftUpper, LeftOut[In], +RightLower, -RightUpper, RightOut[In]] extends AnyRef
  71. final case class HttpApp[-Env](routes: Routes[Env, Response]) extends PartialFunction[Request, ZIO[Env, Response, Response]] with Product with Serializable

    An HTTP application is a collection of routes, all of whose errors have been handled through conversion into HTTP responses.

    An HTTP application is a collection of routes, all of whose errors have been handled through conversion into HTTP responses.

    HTTP applications can be installed into a zio.http.Server, which is capable of using them to serve requests.

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-RC7) Use Routes instead. Will be removed in the next release.

Value Members

  1. def Client: ZClient.type
  2. val Root: PathCodec[Unit]
  3. def boolean(name: String): PathCodec[Boolean]
  4. def handler[H](handler: ⇒ H)(implicit h: ToHandler[H]): Handler[Env, Err, In, Out]

    A smart constructor that attempts to construct a handler from the specified value.

    A smart constructor that attempts to construct a handler from the specified value. If you have difficulty using this function, then please use the constructors on zio.http.Handler directly.

  5. def handlerTODO(message: String): Handler[Any, Nothing, Any, Nothing]
  6. def int(name: String): PathCodec[Int]
  7. def long(name: String): PathCodec[Long]
  8. def string(name: String): PathCodec[String]
  9. val trailing: PathCodec[Path]
  10. def uuid(name: String): PathCodec[UUID]
  11. def withContext[C](fn: ⇒ C)(implicit c: WithContext[C]): ZIO[Env, Err, Out]
  12. object Body
  13. object Boundary extends Serializable
  14. object ChannelEvent
  15. object Charsets
  16. object ClientAuth
  17. object ClientDriver
  18. object ClientSSLCertConfig
  19. object ClientSSLConfig
  20. object ConnectionPoolConfig
  21. object Cookie
  22. object Decompression
  23. object DnsResolver
  24. object Driver extends DriverPlatformSpecific
  25. object Flash
  26. object Form extends Serializable
  27. object FormDecodingError extends Serializable
  28. object FormField
  29. object Handler extends HandlerPlatformSpecific with HandlerVersionSpecific
  30. object HandlerAspect extends HandlerAspects with Serializable
  31. object Header
  32. object Headers
  33. object HttpApp extends Serializable
  34. object MediaType extends MediaTypes with Serializable
  35. object Method
  36. object Middleware extends HandlerAspects
    Annotations
    @nowarn()
  37. object Path extends Serializable
  38. object ProtocolStack
    Annotations
    @nowarn()
  39. object Proxy extends Serializable
  40. object QueryParams
  41. object QueryParamsError extends Serializable
  42. object Request extends Serializable
  43. object RequestHandlerInput
  44. object Response extends Serializable
  45. object Route
  46. object RoutePattern extends Serializable
  47. object Routes extends RoutesCompanionVersionSpecific with Serializable
  48. object SSLConfig extends Serializable
  49. object Scheme
  50. object Server extends ServerPlatformSpecific
  51. object ServerSentEvent extends Serializable
  52. object SocketDecoder extends Serializable
  53. object Status extends Serializable
  54. object StreamingForm extends Serializable
  55. object ToHandler extends HandlerConstructorLowPriorityImplicits0
  56. object URL extends Serializable
  57. object Version
  58. object WebSocketApp extends Serializable
  59. object WebSocketConfig extends Serializable
  60. object WebSocketFrame extends Serializable
  61. object WithContext extends WithContextConstructorLowPriorityImplicits1
  62. object ZClient extends ZClientPlatformSpecific with Serializable
  63. object ZClientAspect
  64. object ZCompose extends ComposeLowPriorityImplicits

Inherited from MdInterpolator

Inherited from UrlInterpolator

Inherited from AnyRef

Inherited from Any

Ungrouped