File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
gradle/build-logic/common-plugins/src/main/kotlin/common Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import io.ktor.client.engine.java.*
66import io.ktor.client.plugins.*
77import io.ktor.client.plugins.compression.*
88import io.ktor.client.plugins.contentnegotiation.*
9+ import io.ktor.client.plugins.cookies.*
910import io.ktor.client.plugins.logging.*
1011import io.ktor.client.plugins.resources.*
1112import io.ktor.client.plugins.resources.Resources
@@ -23,6 +24,7 @@ object ApiClient {
2324 fun get () =
2425 HttpClient (Java ) {
2526 install(Resources )
27+
2628 install(ContentNegotiation ) {
2729 json(
2830 Json {
@@ -31,20 +33,27 @@ object ApiClient {
3133 ignoreUnknownKeys = true
3234 })
3335 }
36+
3437 install(ContentEncoding ) {
3538 deflate(1.0F )
3639 gzip(0.9F )
3740 }
41+
3842 install(HttpTimeout ) {
3943 requestTimeoutMillis = 20_000
4044 connectTimeoutMillis = 5_000
4145 socketTimeoutMillis = 5_000
4246 }
47+
4348 install(Logging ) {
4449 logger = Logger .DEFAULT
4550 level = LogLevel .INFO
4651 }
52+
53+ install(HttpCookies )
54+
4755 engine { pipelining = true }
56+
4857 defaultRequest {
4958 url {
5059 protocol = URLProtocol .HTTPS
You can’t perform that action at this time.
0 commit comments