Migrating 1.1.5 → 1.2.0

1.2.0

Ktor has reached 1.2.0! 🎉

Published 14 May 2019

Version bumps:

  • Kotlin: 1.3.30 -> 1.3.31
  • Kotlinx coroutines: 1.2.0 -> 1.2.1

Breaking changes:

  • Websocket frames and other related stuff have been modified incompatibly due to multiplatform reasons.
  • Core:
    • HttpStatusCode.equals now compares only status code numbers.
  • Auth:
    • Server basic and digest auth are now using UTF-8 by default (can be configured back to the legacy mode).
    • UserHashedTableAuth doesn’t support constant hash salt anymore.
    • Cookie sessions are configured to set cookies at / by default.
    • Server authenticator config reworked to split provider and it’s configuration.
  • Servlet engine:
    • Servlet engine uses servlet init parameters first then context init parameters.
    • Servlet engine handles context path out of the box so one should NOT specify root context path in routing anymore. It is accessible in ApplicationEnvironment.rootPath.
  • Serialization:
    • Serializing Unit in client now sends {}.
    • KotlinxSerializer moved to a separate artifact.
  • All native libraries need to be recompiled with new Kotlin compiler and new libraries.
  • MockEngine lambda receiver is changed to call.
  • Okhttp client upgraded to 3.14.0 so java 8 need to be configured for Android. See https://github.com/square/okhttp/blob/master/CHANGELOG.md#version-3130 and https://medium.com/square-corner-blog/okhttp-3-13-requires-android-5-818bb78d07ce .
  • Client multipart builder DSL: append(Any) is deprecated, use append with the particular type instead.

See 1.2.0 changelog.