|
|
@ -80,6 +80,8 @@ internal class RetrofitNiaNetwork @Inject constructor(
|
|
|
|
private val networkApi = trace("RetrofitNiaNetwork") {
|
|
|
|
private val networkApi = trace("RetrofitNiaNetwork") {
|
|
|
|
Retrofit.Builder()
|
|
|
|
Retrofit.Builder()
|
|
|
|
.baseUrl(NIA_BASE_URL)
|
|
|
|
.baseUrl(NIA_BASE_URL)
|
|
|
|
|
|
|
|
// We use callFactory lambda here with dagger.Lazy<Call.Factory>
|
|
|
|
|
|
|
|
// to prevent initializing OkHttp on the main thread.
|
|
|
|
.callFactory { okhttpCallFactory.get().newCall(it) }
|
|
|
|
.callFactory { okhttpCallFactory.get().newCall(it) }
|
|
|
|
.addConverterFactory(
|
|
|
|
.addConverterFactory(
|
|
|
|
networkJson.asConverterFactory("application/json".toMediaType()),
|
|
|
|
networkJson.asConverterFactory("application/json".toMediaType()),
|
|
|
|