mirror of https://github.com/hykilpikonna/AquaDX
[+] gzip & deflate
parent
fa33cb680e
commit
40a65b5e13
|
@ -63,6 +63,7 @@ dependencies {
|
||||||
implementation("io.ktor:ktor-client-core:2.3.8")
|
implementation("io.ktor:ktor-client-core:2.3.8")
|
||||||
implementation("io.ktor:ktor-client-cio:2.3.8")
|
implementation("io.ktor:ktor-client-cio:2.3.8")
|
||||||
implementation("io.ktor:ktor-client-content-negotiation:2.3.8")
|
implementation("io.ktor:ktor-client-content-negotiation:2.3.8")
|
||||||
|
implementation("io.ktor:ktor-client-encoding:2.3.8")
|
||||||
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.8")
|
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.8")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ dependencies {
|
||||||
// Import: DateTime Parsing
|
// Import: DateTime Parsing
|
||||||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0")
|
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0")
|
||||||
|
|
||||||
// Serailization
|
// Serialization
|
||||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule
|
||||||
import icu.samnyan.aqua.net.utils.ApiException
|
import icu.samnyan.aqua.net.utils.ApiException
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.engine.cio.*
|
import io.ktor.client.engine.cio.*
|
||||||
|
import io.ktor.client.plugins.compression.*
|
||||||
import io.ktor.client.plugins.contentnegotiation.*
|
import io.ktor.client.plugins.contentnegotiation.*
|
||||||
import io.ktor.serialization.kotlinx.json.*
|
import io.ktor.serialization.kotlinx.json.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
@ -88,6 +89,10 @@ val HTTP = HttpClient(CIO) {
|
||||||
install(ContentNegotiation) {
|
install(ContentNegotiation) {
|
||||||
json(JSON)
|
json(JSON)
|
||||||
}
|
}
|
||||||
|
install(ContentEncoding) {
|
||||||
|
gzip()
|
||||||
|
deflate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
val TIKA = Tika()
|
val TIKA = Tika()
|
||||||
val MIMES = MimeTypes.getDefaultMimeTypes()
|
val MIMES = MimeTypes.getDefaultMimeTypes()
|
||||||
|
|
Loading…
Reference in New Issue