Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]#172 : CIO -> okHttp로 마이그레이션 진행 #174

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/src/main/kotlin/com/bff/wespot/data/di/ClientModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.engine.cio.CIO
import io.ktor.client.engine.okhttp.OkHttp
import io.ktor.client.plugins.HttpResponseValidator
import io.ktor.client.plugins.HttpTimeout
import io.ktor.client.plugins.auth.Auth
Expand Down Expand Up @@ -56,7 +56,7 @@ object ClientModule {
navigator: Navigator,
repository: DataStoreRepository,
config: RemoteConfigRepository,
): HttpClient = HttpClient(CIO) {
): HttpClient = HttpClient(OkHttp) {
defaultRequest {
header(HttpHeaders.ContentType, ContentType.Application.Json)
url(config.fetchFromRemoteConfig(RemoteConfigKey.BASE_URL))
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }

ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor-client" }
ktor-client-engine-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor-client" }
ktor-client-engine-okhttp = { group = "io.ktor", name = "ktor-client-okhttp", version.ref = "ktor-client" }
ktor-client-auth = { group = "io.ktor", name = "ktor-client-auth", version.ref = "ktor-client"}
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor-client" }
ktor-client-json = { group = "io.ktor", name = "ktor-client-json", version.ref = "ktor-client" }
Expand Down Expand Up @@ -151,7 +152,7 @@ androidx-compose = [

ktor-client = [
"ktor-client-core",
"ktor-client-engine-cio",
"ktor-client-engine-okhttp",
"ktor-client-content-negotiation",
"ktor-client-auth",
"ktor-client-json",
Expand Down
Loading