complete improvements in repos ktor parts

This commit is contained in:
InsanusMokrassar committed 2022-06-04 00:22:36 +06:00
1 parent eaa143f7d7
commit 78903cd4eb
30 files changed
+805 -38

No files matched your search

@@ -0,0 +1,15 @@
package dev.inmo.micro_utils.ktor.server
import io.ktor.server.application.ApplicationCall
import io.ktor.server.response.responseType
import io.ktor.util.InternalAPI
import io.ktor.util.reflect.TypeInfo
@InternalAPI
suspend fun <T : Any> ApplicationCall.respond(
message: T,
typeInfo: TypeInfo
) {
response.responseType = typeInfo
response.pipeline.execute(this, message as Any)
}