:exclamation: Latest changes in ktor API - intro...
# ktor
c
Latest changes in ktor API - introduced
statusPage
and
errorPage
so you can configure generalized status/error pages for the application -
application.transform
and
call.transform
should be used to register new response message transformers (so you can send custom messages via
call.respond()
). so now instead of
Copy code
call.interceptRespond(phase) { obj ->
    if (obj is MyType) {
        call.respond(SomeResponse(obj.something))
    }
}
you should register transformer like this
Copy code
application.transform.register<MyType> { my -> SomeResponse(my.something) }