Ktor 3.1.0 brings SSE improvements, Wasm support, HTTPClient Mulipart, New CLI Tool & more
Kotlin 3.1.0 has been released as the first minor update of the year, bringing a variety of new features and improvements. This update emphasizes enhancements in server-sent events (SSE), better documentation, WebAssembly (Wasm) support, and updates to dependency injection design, while also preparing for future gRPC integration. A new Ktor CLI tool has been introduced to streamline project creation by generating templates with selected features, thereby reducing setup times.
Among the improvements, SSE now offers better serialization support, automatic handling of structured data, and configurable reconnection attempts. The HttpClient has enhanced multipart support for file uploads, while the compression plugin provides more control over specific requests. Updates to the CIO server and client now support Wasm and JavaScript targets, and Unix Domain Socket support has been added for native targets.
Additionally, the release includes basic gRPC support through kotlinx-rpc, with plans for further integration, and the MCP Kotlin SDK for LLM integration to facilitate API exposure to AI-driven agents.