Unverified Commit 607378a7 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #1214 from MariusVolkhart/okHttpBuilder

[IMPROVEMENT] Change OkHttpClient initialization in Dagger graph
parents 10d7f944 9e8e6209
...@@ -111,12 +111,12 @@ class AppModule { ...@@ -111,12 +111,12 @@ class AppModule {
@Provides @Provides
@Singleton @Singleton
fun provideOkHttpClient(logger: HttpLoggingInterceptor): OkHttpClient { fun provideOkHttpClient(logger: HttpLoggingInterceptor): OkHttpClient {
return OkHttpClient.Builder().apply { return OkHttpClient.Builder()
addInterceptor(logger) .addInterceptor(logger)
connectTimeout(15, TimeUnit.SECONDS) .connectTimeout(15, TimeUnit.SECONDS)
readTimeout(20, TimeUnit.SECONDS) .readTimeout(20, TimeUnit.SECONDS)
writeTimeout(15, TimeUnit.SECONDS) .writeTimeout(15, TimeUnit.SECONDS)
}.build() .build()
} }
@Provides @Provides
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment