Ktor (Kotlin)
Build async Kotlin servers and clients with Ktor. Generate routing, content negotiation, authentication, WebSockets, and HTTP clients using Kotlin coroutines for lightweight, non-blocking backends.
This skill helps you build server-side Kotlin applications with Ktor, JetBrains' async framework. It generates structured routing, serialization with kotlinx.serialization, authentication providers (JWT, OAuth, session), WebSocket handlers, and type-safe HTTP clients — all powered by coroutines.
When to use
Use when building Kotlin backends, creating microservices on JVM with coroutines, or when you want a lightweight alternative to Spring Boot for Kotlin-first development.
Examples
REST API with serialization
Build a typed API with Kotlin serialization
Create a Ktor REST API with kotlinx.serialization, structured routing for a task manager, JWT authentication, and content negotiation for JSON
HTTP client with retries
Build a resilient API client
Set up a Ktor HTTP client with retry logic, timeouts, request/response logging, and kotlinx.serialization for consuming a third-party REST API