zio.http.api

package zio.http.api

Members list

Concise view

Type members

Classlikes

sealed trait CodecType

Attributes

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

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Combiner[L, R]

A combiner is a type class responsible for combining invariant type parameters. It is used to compose the parameters of the zio.http.api.HttpCodec data type.

A combiner is a type class responsible for combining invariant type parameters. It is used to compose the parameters of the zio.http.api.HttpCodec data type.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

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

Attributes

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait Doc

A Doc models documentation for an endpoint or input.

A Doc models documentation for an endpoint or input.

Attributes

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

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Doc.type
sealed trait EndpointError extends Exception

Attributes

Companion:
object
Graph
Supertypes
class Exception
class Throwable
trait Serializable
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 EndpointExecutor[+MI, +MO, +Ids]

A zio.http.api.EndpointExecutor is responsible for taking an endpoint invocation, and executing this invocation, returning the final result, or failing with some kind of RPC error.

A zio.http.api.EndpointExecutor is responsible for taking an endpoint invocation, and executing this invocation, returning the final result, or failing with some kind of RPC error.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
EndpointExecutor[MI, MO, Ids]

Attributes

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class EndpointRegistry[MI, MO, Ids]
final case class EndpointRegistry[-MI, +MO, +Ids] extends EndpointLocator

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
EndpointRegistry[MI, MO, Ids]

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class EndpointSpec[Input, Output](input: HttpCodec[RequestType, Input], output: HttpCodec[ResponseType, Output], doc: Doc)

An zio.http.api.EndpointSpec represents an API endpoint for the HTTP protocol. Every API has an input, which comes from a combination of the HTTP path, query string parameters, and headers, and an output, which is the data computed by the handler of the API.

An zio.http.api.EndpointSpec represents an API endpoint for the HTTP protocol. Every API has an input, which comes from a combination of the HTTP path, query string parameters, and headers, and an output, which is the data computed by the handler of the API.

MiddlewareInput : Example: A subset of HttpCodec[Input] that doesn't give access to Input MiddlewareOutput: Example: A subset of Out[Output] that doesn't give access to Output Input: Example: Int Output: Example: User

As zio.http.api.EndpointSpec is a purely declarative encoding of an endpoint, it is possible to use this model to generate a zio.http.App (by supplying a handler for the endpoint), to generate OpenAPI documentation, to generate a type-safe Scala client for the endpoint, and possibly, to generate client libraries in other programming languages.

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
EndpointSpec[Input, Output]

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Endpoints[-R, +E, AllIds]

Represents a collection of API endpoints that all have handlers.

Represents a collection of API endpoints that all have handlers.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Concat[R, E, Ids1, Ids2]
class HandledEndpoint[R, E, In0, Out0, Id]
Self type
Endpoints[R, E, AllIds]
object Endpoints

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object HeaderCodec extends HeaderCodecs

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object HeaderCodec.type
object HttpCodec.type
sealed trait HttpCodec[-AtomTypes, Value]

A zio.http.api.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.api.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
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
HttpCodec[AtomTypes, Value]
object HttpCodec extends HeaderCodecs

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Invocation[Id, A, B](api: EndpointSpec[A, B], input: A)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Middleware[-R, I, O]

A Middleware represents the implementation of a MiddlewareSpec, intercepting parts of the request, and appending to the response.

A Middleware represents the implementation of a MiddlewareSpec, intercepting parts of the request, and appending to the response.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Middleware[R, I, O]
object Middleware

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class MiddlewareSpec[MiddlewareIn, MiddlewareOut](middlewareIn: HttpCodec[Header & Query & Method, MiddlewareIn], middlewareOut: HttpCodec[Header, MiddlewareOut])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
MiddlewareSpec[MiddlewareIn, MiddlewareOut]

Attributes

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object RouteCodec

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait ServiceSpec[MI, MO, -AllIds]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ServiceSpec[MI, MO, AllIds]

Attributes

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

Types

type BodyCodec[A] = HttpCodec[Body, A]
type QueryCodec[A] = HttpCodec[Query, A]
type RouteCodec[A] = HttpCodec[Route, A]

Implicits

Implicits

implicit def string2HttpCodec(string: String): RouteCodec[Unit]