Jetbrains released a new version 2.0 of Ktor. This release was announced and discussed in a recent blog post from the company.
The previously released version was 1.6.8. And the new version is 2.0.0. That means, this is a major change, and there can be breaking changes, compared to the previous version (as most of the major version change releases are).
You can check the release history at the GitHub repo release page: https://github.com/ktorio/ktor/releases.
Ktor is a simple way introduced by JetBrains, to Create asynchronous client and server applications. Can be used for microservices or other HTTP client apps. This is open-source, lightweight, flexible, and benefits using Kotlin and Coroutine.
You can check the list of the changes at their GitHub release information: https://github.com/ktorio/ktor/releases/tag/2.0.0 , and much more details of it in the blog post: https://blog.jetbrains.com/ktor/2022/04/11/ktor-2-0-released/
Here is the brief of it:
Ktor 2.0 Server Changes:
- Simplified extensibility API, which makes the creation of plugins a lot easier.
- Kotlin/Native support for the Ktor server.
- Random port support.
- Improved testing API.
- Type-safe routing.
- XML Serialization.
- Subroutes for plugins.
Ktor 2.0 Client Changes:
- Simplified API for client.
- Built-in support for retries, including control over the time between retries.
- Content negotiation support. Which enables the server and client to negotiate which type of content will be served.
Ktor 2.0 is compatible with Kotlin 1.6.20.