package api
- Alphabetic
- By Inheritance
- api
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type BodyCodec[A] = HttpCodec[api.CodecType.Body, A]
- sealed trait CodecType extends AnyRef
- sealed trait Combiner[L, R] extends AnyRef
A combiner is a type class responsible for combining invariant type parameters.
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.
- trait CombinerLowPriority1 extends CombinerLowPriority2
- trait CombinerLowPriority2 extends CombinerLowPriority3
- trait CombinerLowPriority3 extends CombinerLowPriority4
- trait CombinerLowPriority4 extends AnyRef
- sealed trait Doc extends AnyRef
A
Doc
models documentation for an endpoint or input. - sealed trait EndpointError extends Exception
- trait EndpointExecutor[+MI, +MO, +Ids] extends AnyRef
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.
- trait EndpointLocator extends AnyRef
- final case class EndpointRegistry[-MI, +MO, +Ids] extends EndpointLocator with Product with Serializable
- final case class EndpointSpec[Input, Output](input: HttpCodec[RequestType, Input], output: HttpCodec[ResponseType, Output], doc: Doc) extends Product with Serializable
An zio.http.api.EndpointSpec represents an API endpoint for the HTTP protocol.
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 toInput
MiddlewareOutput: Example: A subset ofOut[Output]
that doesn't give access toOutput
Input: Example: Int Output: Example: UserAs 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.
- sealed trait Endpoints[-R, +E, AllIds] extends AnyRef
Represents a collection of API endpoints that all have handlers.
- type HeaderCodec[A] = HttpCodec[Header, A]
- trait HeaderCodecs extends AnyRef
- sealed trait HttpCodec[-AtomTypes, Value] extends AnyRef
A zio.http.api.HttpCodec represents a codec for a part of an HTTP request.
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.
- final case class Invocation[Id, A, B](api: EndpointSpec[A, B], input: A) extends Product with Serializable
- type MethodCodec[A] = HttpCodec[Method, A]
- sealed trait Middleware[-R, I, O] extends AnyRef
A
Middleware
represents the implementation of aMiddlewareSpec
, intercepting parts of the request, and appending to the response. - final case class MiddlewareSpec[MiddlewareIn, MiddlewareOut](middlewareIn: HttpCodec[Header with Query with Method, MiddlewareIn], middlewareOut: HttpCodec[Header, MiddlewareOut]) extends Product with Serializable
- type QueryCodec[A] = HttpCodec[Query, A]
- type RouteCodec[A] = HttpCodec[Route, A]
- sealed trait ServiceSpec[MI, MO, -AllIds] extends AnyRef
- type StatusCodec[A] = HttpCodec[Status, A]
Value Members
- implicit def string2HttpCodec(string: String): RouteCodec[Unit]
- object CodecType
- object Combiner extends CombinerLowPriority1
- object Doc
- object EndpointError extends Serializable
- object EndpointExecutor
- object EndpointRegistry extends Serializable
- object EndpointSpec extends Serializable
- object Endpoints
- object HeaderCodec extends HeaderCodecs
- object HttpCodec extends HeaderCodecs with QueryCodecs with RouteCodecs
- object MethodCodec extends MethodCodecs
- object Middleware
- object MiddlewareSpec extends Serializable
- object QueryCodec extends QueryCodecs
- object RouteCodec extends RouteCodecs
- object ServiceSpec