zio.http.codec

package zio.http.codec

Members list

Packages

Type members

Classlikes

sealed trait Alternator[L, R]

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.

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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type
Alternator.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Alternator.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait Combiner[L, R]

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.

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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Show all
Self type
Combiner.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object Combiner.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes
object Combiner.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ContentCodec

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Doc

A Doc models documentation for an endpoint or input.

A Doc models documentation for an endpoint or input.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Empty.type
class Header
class Listing
class Paragraph
class Sequence
Show all
Self type
Doc
object Doc

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Doc.type
object HeaderCodec

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait HttpCodec[-AtomTypes, Value]

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
HttpCodec[AtomTypes, Value]
object HttpCodec

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
HttpCodec.type
sealed trait HttpCodecError extends Exception, NoStackTrace

Attributes

Companion
object
Supertypes
trait NoStackTrace
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait HttpCodecType

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object HttpCodecType

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
final case class HttpContentCodec[A](choices: ListMap[MediaType, BinaryCodec[A]], schema: Schema[A])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object MethodCodec

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait PathCodec[A]

A codec for paths, which consists of segments, where each segment may be a literal, an integer, a long, a string, a UUID, or the trailing path.

A codec for paths, which consists of segments, where each segment may be a literal, an integer, a long, a string, a UUID, or the trailing path.

import zio.http.endpoint.PathCodec._

val pathCodec = empty / "users" / int("user-id") / "posts" / string("post-id")

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Annotated[A]
Self type
object PathCodec

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
PathCodec.type
object QueryCodec

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
QueryCodec.type
sealed abstract class RichTextCodec[A]

A RichTextCodec is a more compositional version of TextCodec, 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.

A RichTextCodec is a more compositional version of TextCodec, 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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
object RichTextCodec

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait SegmentCodec[A]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Trailing.type
Self type
object SegmentCodec

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
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. There are no other possibilities.

A simple codec is either equal to a given value, or unconstrained within a domain of values. There are no other possibilities.

Attributes

Companion
object
Supertypes
trait PartialFunction[Input, Output]
trait Input => Output
class Object
trait Matchable
class Any
Known subtypes
class Specified[A]
class Unspecified[A]
object SimpleCodec

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object StatusCodec

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait TextCodec[A] extends PartialFunction[String, A]

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.

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.

Attributes

Companion
object
Supertypes
trait PartialFunction[String, A]
trait String => A
class Object
trait Matchable
class Any
Known subtypes
object BooleanCodec.type
class Constant
object IntCodec.type
object LongCodec.type
object StringCodec.type
object UUIDCodec.type
Show all
Self type
object TextCodec

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
TextCodec.type

Types

type HeaderCodec[A] = HttpCodec[Header, A]
type MethodCodec[A] = HttpCodec[Method, A]
type QueryCodec[A] = HttpCodec[Query, A]
type StatusCodec[A] = HttpCodec[Status, A]