added installation

This commit is contained in:
InsanusMokrassar 2019-10-18 03:15:59 +06:00
parent 125b66e237
commit 292c0cdeee
2 changed files with 13 additions and 0 deletions

View File

@ -33,6 +33,8 @@ dependencies {
api "io.ktor:ktor-client:$ktor_version"
api "io.ktor:ktor-client-websockets:$ktor_version"
api "io.ktor:ktor-client-json-jvm:$ktor_version"
api "io.ktor:ktor-client-serialization-jvm:$ktor_version"
}
compileKotlin {

View File

@ -0,0 +1,11 @@
package com.insanusmokrassar.postssystem.core.client
import io.ktor.client.HttpClientConfig
import io.ktor.client.features.json.JsonFeature
import io.ktor.client.features.json.serializer.KotlinxSerializer
fun HttpClientConfig<*>.installPostsCore() {
install(JsonFeature) {
serializer = KotlinxSerializer()
}
}