ZIO HTTP Reference
This section offers a detailed reference for the essential concepts and ideas in the ZIO HTTP library.
🗃️ aop
3 items
🗃️ Body
3 items
📄️ Client
ZClient is an HTTP client that enables us to make HTTP requests and handle responses in a purely functional manner. ZClient leverages the ZIO library's capabilities to provide a high-performance, asynchronous, and type-safe HTTP client solution.
🗃️ configs
6 items
📄️ Endpoint
The Endpoint API in ZIO HTTP, is an alternative way to describe the endpoints but in a declarative way. It is a high-level API that allows us to describe the endpoints and their inputs, outputs, and how they should look. So we can think of it as a DSL for just describing the endpoints, and then we can implement them separately.
📄️ Request Handler
A Handler is responsible for processing the matched incoming request and generating an appropriate response. It is a function that takes a Request and produces a Response. Thus, it is a crucial component of the ZIO HTTP that determines how the server should respond to a request matched by the corresponding RoutePattern.
🗃️ Headers
1 items
📄️ HttpCodec
In ZIO HTTP when we work with HTTP requests and responses, we are not dealing with raw bytes but with structured data. This structured data is represented by the Request and Response types. But under the hood, these types are serialized and deserialized to and from raw bytes. This process is handled by HTTP Codecs. We can think of HttpCodec as a pair of functions both for encoding and decoding requests and responses:
📄️ OpenAPI codegen sbt plugin
This plugin allows to easily generate scala source code with zio-http Endpoints from OpenAPI spec files.
📄️ Overview
ZIO HTTP offers an expressive API for creating HTTP applications. It uses a domain-specific language (DSL) to define routes and handlers. Both server and client are designed in terms of HTTP as a function, so they are functions from Request to Response.
📄️ Request
ZIO HTTP Request is designed in the simplest way possible to decode an HTTP Request into a ZIO HTTP request. It supports all HTTP request methods (as defined in RFC2616 ) and headers along with custom methods and headers.
🗃️ Response
1 items
🗃️ routing
3 items
📄️ Server
Using the ZIO HTTP Server, we can serve one or more HTTP applications. It provides methods to install HTTP applications into the server. Also it offers a comprehensive Config class that allows fine-grained control over server behavior. We can configure settings such as SSL/TLS, address binding, request decompression and response compression, and more.
🗃️ Socket
1 items