zio.http.api
Type members
Classlikes
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.
- Companion:
- object
A Doc
models documentation for an endpoint or input.
A Doc
models documentation for an endpoint or input.
- Companion:
- object
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.
- Companion:
- object
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.HttpApp (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.
- Companion:
- object
Represents a collection of API endpoints that all have handlers.
Represents a collection of API endpoints that all have handlers.
- Companion:
- object
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.
- Companion:
- object
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.
- Companion:
- object