package ru.fincode.tsudesk.core.network.interceptor

import android.util.Log
import okhttp3.Interceptor
import okhttp3.Response
import ru.fincode.tsudesk.core.common.log.logD
import javax.inject.Inject
import javax.inject.Singleton


@Singleton
class DebugInterceptor @Inject constructor() : Interceptor {

    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request()
        logD("URL: ${request.url}")
        logD("Method: ${request.method}")
        return chain.proceed(request)
    }
}
