mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-13 23:32:46 -05:00
TVT-63: Add Support for OkHttpProfiler
This commit is contained in:
@@ -103,11 +103,13 @@ dependencies {
|
|||||||
def retrofit = "2.9.0"
|
def retrofit = "2.9.0"
|
||||||
def stetho = "1.6.0"
|
def stetho = "1.6.0"
|
||||||
def gson = "2.9.0"
|
def gson = "2.9.0"
|
||||||
|
def profiler = "1.0.8"
|
||||||
implementation "com.squareup.retrofit2:retrofit:$retrofit"
|
implementation "com.squareup.retrofit2:retrofit:$retrofit"
|
||||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit"
|
implementation "com.squareup.retrofit2:converter-gson:$retrofit"
|
||||||
implementation "com.google.code.gson:gson:$gson"
|
implementation "com.google.code.gson:gson:$gson"
|
||||||
implementation "com.facebook.stetho:stetho:$stetho"
|
implementation "com.facebook.stetho:stetho:$stetho"
|
||||||
implementation "com.facebook.stetho:stetho-okhttp3:$stetho"
|
implementation "com.facebook.stetho:stetho-okhttp3:$stetho"
|
||||||
|
implementation "com.localebro:okhttpprofiler:$profiler"
|
||||||
|
|
||||||
// koin
|
// koin
|
||||||
def koin = "3.1.4"
|
def koin = "3.1.4"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.owenlejeune.tvtime.api
|
package com.owenlejeune.tvtime.api
|
||||||
|
|
||||||
import com.facebook.stetho.okhttp3.StethoInterceptor
|
import com.facebook.stetho.okhttp3.StethoInterceptor
|
||||||
|
import com.localebro.okhttpprofiler.OkHttpProfilerInterceptor
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
class DebugHttpClient: HttpClient {
|
class DebugHttpClient: HttpClient {
|
||||||
override val httpClient: OkHttpClient = OkHttpClient.Builder()
|
override val httpClient: OkHttpClient = OkHttpClient.Builder()
|
||||||
|
.addInterceptor(OkHttpProfilerInterceptor())
|
||||||
.addNetworkInterceptor(StethoInterceptor())
|
.addNetworkInterceptor(StethoInterceptor())
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user