package codec
- Alphabetic
- By Inheritance
- codec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Alternator[L, R] extends AnyRef
A alternator is a type class responsible for combining invariant type parameters using an either.
A alternator is a type class responsible for combining invariant type parameters using an either. It is used to compose parameters of the zio.http.codec.HttpCodec data type.
- trait AlternatorLowPriority1 extends AlternatorLowPriority2
- trait AlternatorLowPriority2 extends AlternatorLowPriority3
- trait AlternatorLowPriority3 extends AnyRef
- sealed trait Combiner[L, R] extends AnyRef
A combiner is a type class responsible for combining invariant type parameters using a tuple.
A combiner is a type class responsible for combining invariant type parameters using a tuple. It is used to compose the parameters of the zio.http.codec.HttpCodec data type.
- trait CombinerLowPriority1 extends CombinerLowPriority2
- trait CombinerLowPriority2 extends CombinerLowPriority3
- trait CombinerLowPriority3 extends CombinerLowPriority4
- trait CombinerLowPriority4 extends AnyRef
- type ContentCodec[A] = HttpCodec[Content, A]
- sealed trait Doc extends AnyRef
A
Doc
models documentation for an endpoint or input. - type HeaderCodec[A] = HttpCodec[Header, A]
- sealed trait HttpCodec[-AtomTypes, Value] extends AnyRef
A zio.http.codec.HttpCodec represents a codec for a part of an HTTP request.
A zio.http.codec.HttpCodec represents a codec for a part of an HTTP request. HttpCodec the HTTP protocol, these parts may be the unconsumed portion of the HTTP path (a route codec), the query string parameters (a query codec), the request headers (a header codec), or the request body (a body codec).
A HttpCodec is a purely declarative description of an input, and therefore, it can be used to generate documentation, clients, and client libraries.
HttpCodecs are a bit like invertible multi-channel parsers.
- sealed trait HttpCodecError extends Exception with NoStackTrace
- sealed trait HttpCodecType extends AnyRef
- type MethodCodec[A] = HttpCodec[Method, A]
- type PathCodec[A] = HttpCodec[codec.HttpCodecType.Path, A]
- type QueryCodec[A] = HttpCodec[Query, A]
- sealed trait RichTextCodec[A] extends AnyRef
A
RichTextCodec
is a more compositional version ofTextCodec
, which has similar power to traditional parser combinators / pretty printers.A
RichTextCodec
is a more compositional version ofTextCodec
, which has similar power to traditional parser combinators / pretty printers. Although slower than the simpler text codecs, they can be utilized to parse structured information in HTTP headers, which in turn allows generating much better error messages and documentation than otherwise possible. - sealed trait SimpleCodec[Input, Output] extends PartialFunction[Input, Output]
A simple codec is either equal to a given value, or unconstrained within a domain of values.
- type StatusCodec[A] = HttpCodec[Status, A]
- sealed trait TextCodec[A] extends PartialFunction[String, A]
A zio.http.codec.TextCodec defines a codec for a text fragment.
A zio.http.codec.TextCodec defines a codec for a text fragment. The text fragment can be decoded into a value, or the value can be encoded into a text fragment.
Unlike parsers, text codecs operate on entire fragments. They do not consume input and leave remainders. Also unlike parsers, text codecs do not fail with error messages, but rather, simply return None if they do not succeed in decoding from a given text fragment. Finally, unlike ordinary parsers, text codecs are fully invertible, and can therefore be used in client generation.
Value Members
- object Alternator extends AlternatorLowPriority1
- object Combiner extends CombinerLowPriority1
- object ContentCodec extends ContentCodecs
- object Doc
- object HeaderCodec extends HeaderCodecs
- object HttpCodec extends ContentCodecs with HeaderCodecs with MethodCodecs with PathCodecs with QueryCodecs with StatusCodecs
- object HttpCodecError extends Serializable
- object HttpCodecType
- object MethodCodec extends MethodCodecs
- object PathCodec extends PathCodecs
- object QueryCodec extends QueryCodecs
- object RichTextCodec
- object SimpleCodec
- object StatusCodec extends StatusCodecs
- object TextCodec