Skip to content

Monitor 是一个适用于使用了 OkHttp/Retrofit 作为网络请求框架的项目,只要添加了 MonitorInterceptor 拦截器,Monitor 就会自动记录并保存所有的网络请求信息且自动弹窗提示

License

Notifications You must be signed in to change notification settings

CrackerCat/Monitor-1

 
 

Repository files navigation

Monitor Maven Central

一个适用于 OkHttp 和 Retrofit 的可视化抓包工具

只需为 OkHttpClient 添加 MonitorInterceptor,就会自动记录并缓存所有的网络请求信息,并提供可视化界面进行查看

val okHttpClient = OkHttpClient.Builder()
    .addNetworkInterceptor(interceptor = MonitorInterceptor())
    .build()

同时引入 debug 和 release 版本的依赖库

  • debug 依赖用于日常的开发阶段
  • release 依赖用于最终的上线阶段,此模式下的 MonitorInterceptor 不包含任何依赖,也不会执行任何操作
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

dependencies {
    val latestVersion = "x.x.x"
    debugImplementation("io.github.leavesczy:monitor:${latestVersion}")
    releaseImplementation("io.github.leavesczy:monitor-no-op:${latestVersion}")
}

About

Monitor 是一个适用于使用了 OkHttp/Retrofit 作为网络请求框架的项目,只要添加了 MonitorInterceptor 拦截器,Monitor 就会自动记录并保存所有的网络请求信息且自动弹窗提示

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%