Home

ktor

Ktor is an asynchronous framework for building connected applications in Kotlin. Developed by JetBrains, it supports server and client development and is designed for non-blocking I/O using Kotlin coroutines. It targets JVM and multiplatform projects, including Kotlin/JS and Kotlin/Native, enabling code sharing between client and server.

Core concepts in Ktor revolve around modular design and a lightweight programming model. Applications are composed

Server-side features include ContentNegotiation for formatting payloads (JSON, XML, and other formats via serializers such as

Ktor also provides a multiplatform client library for HTTP requests. The Ktor client supports serialization, content

License and history: Ktor is open source under the Apache 2.0 license and is maintained by JetBrains

from
modules
called
features
(plugins)
that
extend
functionality.
The
routing
DSL
provides
a
type-safe
way
to
define
HTTP
endpoints.
A
server
engine
runs
the
application,
with
common
choices
including
Netty,
CIO,
Jetty,
and
Tomcat.
The
request
handling
pipeline
is
built
by
installing
features
and
defining
routes.
kotlinx.serialization,
Jackson,
or
Gson),
Sessions,
Authentication,
CORS,
Compression,
Caching,
and
WebSockets.
Ktor
emphasizes
a
modular,
extensible
architecture
and
aims
for
clear,
readable
builder
code.
negotiation,
authentication,
and
WebSockets
across
Kotlin
targets,
enabling
shared
code
between
server
and
client
in
multiplatform
projects.
with
community
contributors.
It
debuted
in
the
mid-2010s
and
has
evolved
into
a
versatile
framework
used
for
REST
APIs,
microservices,
real-time
applications,
and
other
networked
software
written
in
Kotlin.