cy
07/09/2018, 6:19 PMsealed class MyResponse {
class A : MyResponse()
}
application.sendPipeline.intercept(ApplicationSendPipeline.Transform) { it ->
if (it is MyResponse) {
when (it) {
is MyResponse.A -> proceedWith(TextContent("MyResponse.A { ... }", contentType = ContentType.Text.Plain))
}
}
}
application.routing {
get("/") {
call.respond(MyResponse.A())
}
}