
Ktor 3.4 additionally introduces a brand new API for dynamically documenting endpoints that works in tandem with a brand new compiler plugin. As an alternative of constructing a Swagger entrance finish from a static file, the mannequin is constructed at runtime from particulars embedded within the routing tree. To generate documentation, builders can allow it by way of the Ktor Gradle plugin, then it’ll routinely present particulars in code by way of the brand new describe API.
Additionally in Ktor 3.4, the OkHttp shopper engine now helps duplex streaming, enabling purchasers to ship request physique information and obtain response information concurrently, in distinction to common HTTP calls, the place the request physique should be totally despatched earlier than the response begins. Duplex streaming is on the market for HTTP/2 connections and could be enabled utilizing the brand new duplexStreamingEnabled property in OkHttpConfig.
And the Compression plugin now helps Ztsd by way of a ktor-server-compression-zstd module. Zstd is a quick compression algorithm with excessive compression ratios, low compression instances, and a configurable compression degree.

