一个适用于 OkHttp / Retrofit 的可视化抓包工具
一个适用于 OkHttp 和 Retrofit 的可视化抓包工具
只需为 OkHttpClient 添加 MonitorInterceptor,就会自动记录并缓存所有的网络请求信息,并提供可视化界面进行查看
val okHttpClient = OkHttpClient.Builder()
.addInterceptor(MonitorInterceptor())
.build()
同时引入 debug 和 release 版本的依赖库
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
dependencies {
val latestVersion = "x.x.x"
debugImplementation("io.github.leavesczy:monitor:${latestVersion}")
releaseImplementation("io.github.leavesczy:monitor-no-op:${latestVersion}")
}