p

zio

http

package http

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. Protected

Package Members

  1. package codec
  2. package endpoint
  3. package internal
  4. package netty
  5. package template

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. trait ClientDriver extends AnyRef
  7. sealed trait ClientSSLConfig extends AnyRef
  8. trait ComposeLowPriorityImplicits extends AnyRef
  9. trait ConnectionPool[Connection] extends AnyRef
  10. sealed trait ConnectionPoolConfig extends AnyRef
  11. 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.

  12. final case class Credentials(uname: String, upassword: String) extends Product with Serializable
  13. sealed trait Decompression extends AnyRef
  14. trait DnsResolver extends AnyRef
  15. trait Driver extends AnyRef
  16. final case class Form(formData: Chunk[FormField]) extends Product with Serializable

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

  17. sealed trait FormDecodingError extends Exception

    Represents a form decoding error.

  18. 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.

  19. sealed trait Handler[-R, +Err, -In, +Out] extends AnyRef
  20. 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.

  21. sealed trait Header extends AnyRef
  22. 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.

  23. 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.

  24. trait MdInterpolator extends AnyRef
  25. implicit class MdInterpolatorHelper extends AnyRef
    Definition Classes
    MdInterpolator
  26. 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
  27. sealed trait Method extends AnyRef

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

  28. trait Middleware[-UpperEnv] extends AnyRef
  29. 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.

  30. 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).

  31. 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

  32. final case class QueryParams(map: Map[String, Chunk[String]]) extends Product with Serializable

    A collection of query parameters.

  33. 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) extends HeaderOps[Request] with Product with Serializable
  34. type RequestHandler[-R, +Err] = Handler[R, Err, Request, Response]
  35. final class RequestHandlerInput[A, I] extends AnyRef
    Annotations
    @implicitNotFound()
  36. final case class Response(status: Status = Status.Ok, headers: Headers = Headers.empty, body: Body = Body.empty) extends HeaderOps[Response] with Product with Serializable
  37. sealed trait Route[-Env, +Err] extends AnyRef
  38. abstract class RouteDecode[A] extends AnyRef
  39. 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.

  40. final class Routes[-Env, +Err] extends AnyRef

    Represents a collection of routes, each of which is defined by a pattern and a handler.

    Represents a collection of routes, each of which is defined by a pattern and a handler. This data type can be thought of as modeling a routing table, which decides where to direct every endpoint in an API based on both method and path of the request.

    When you are done building a collection of routes, you typically convert the routes into an zio.http.HttpApp value, which can be done with the toHttpApp method.

    Routes may have handled or unhandled errors. A route of type Route[Env, Throwable], for example, has not handled its errors by converting them into responses. Such unfinished routes cannot yet be converted into zio.http.HttpApp values. First, you must handle errors with the handleError or handleErrorCause methods.

  41. final case class SSLConfig(behaviour: HttpBehaviour, data: Data, provider: Provider) extends Product with Serializable
  42. sealed trait Scheme extends AnyRef
  43. trait Server extends AnyRef

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

  44. 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

  45. 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

  46. sealed trait Status extends Product with Serializable
  47. final case class StreamingForm(source: ZStream[Any, Throwable, Byte], boundary: Boundary, bufferSize: Int = 8192) extends Product with Serializable
  48. trait ToHandler[H] extends AnyRef
    Annotations
    @implicitNotFound()
  49. final case class URL(path: Path, kind: Location = URL.Location.Relative, queryParams: QueryParams = QueryParams.empty, fragment: Option[Fragment] = None) extends Product with Serializable
  50. trait UrlInterpolator extends AnyRef
  51. implicit class UrlInterpolatorHelper extends AnyRef
    Definition Classes
    UrlInterpolator
  52. sealed trait Version extends AnyRef
  53. final case class WebSocketApp[-R](handler: Handler[R, Throwable, WebSocketChannel, Any], customConfig: Option[WebSocketConfig]) extends Product with Serializable
  54. type WebSocketChannel = Channel[WebSocketChannelEvent, WebSocketChannelEvent]

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

  55. type WebSocketChannelEvent = ChannelEvent[WebSocketFrame]

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

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

    Server side websocket configuration

  57. sealed trait WebSocketFrame extends Product with Serializable
  58. 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
  59. 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.

  60. trait ZCompose[+LeftLower, -LeftUpper, LeftOut[In], +RightLower, -RightUpper, RightOut[In]] extends AnyRef

Value Members

  1. def Client: ZClient.type
  2. val Empty: Path
  3. val Root: Path
  4. def boolean(name: String): PathCodec[Boolean]
  5. 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.

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

Inherited from MdInterpolator

Inherited from UrlInterpolator

Inherited from AnyRef

Inherited from Any

Ungrouped