Skip to content

Commit

Permalink
interceotors and okhttp removed
Browse files Browse the repository at this point in the history
  • Loading branch information
rohegde7 committed May 11, 2020
1 parent ad301ff commit 9cd8c24
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
Binary file modified .gradle/5.6.4/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.6.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.6.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.rohegde7.rooper.network

import com.google.gson.GsonBuilder
import com.rohegde7.rooper.ignore.interceptor.LoggerInterceptor
import io.reactivex.schedulers.Schedulers
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory
Expand All @@ -17,17 +15,17 @@ object CustomRetrofitProvider {
fun getRetrofit(baseUrl: String): Retrofit {
return Retrofit.Builder()
.baseUrl(baseUrl)
.client(getMyHttpClient())
// .client(getMyHttpClient())
.addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(Schedulers.io()))
.build()
}

private fun getMyHttpClient(): OkHttpClient {
/*private fun getMyHttpClient(): OkHttpClient {
val builder = OkHttpClient().newBuilder()
// .addNetworkInterceptor(CachingInterceptor())
// .addNetworkInterceptor(ForceCacheInterceptor())
.addNetworkInterceptor(LoggerInterceptor())
return builder.build()
}
}*/
}

0 comments on commit 9cd8c24

Please sign in to comment.