<How pass to module of Dagger parameter action: ((...
# stackoverflow
u
How pass to module of Dagger parameter action: (() -&gt; Unit) for repeat request after lost connection I want check internet connection use ConnectivityInterceptor and passed parameter action: (() -> Unit) to module of dagger for repeat call request after connection was lost, how can I do it? @Module class NetworkModule { private fun getOkHttpClient(context: Context, action: (() -> Unit)): OkHttpClient { return OkHttpClient.Builder() .hostnameVerifier { s, sslSession -> true } .connectTimeout(TIME.toLong(), TimeUnit.SECONDS)...