Skip to content

Android part of the Android Studio(Intellij IDEA) OkHttp Analyzer plugin which would analyze details of requests and responses from OkHttpClient.

License

Notifications You must be signed in to change notification settings

bytebeats/okhttp-analyzer-interceptor

Repository files navigation

okhttp-analyzer-interceptor

GitHub latest commit GitHub contributors GitHub issues Open Source? Yes! GitHub forks GitHub stars GitHub watchers

An intellij platform plugin. To analyze details of requests and responses from OkHttp.

Tech stack and why

How to use

For OkHttp
Dependencies
  1. add maven url in your root build.gradle:
    repositories {
       maven { url('https://repo1.maven.org/maven2/') }
               ...
    }
  1. add dependency in your module build.gradle
dependencies {
    implementation "androidx.compose.ui:ui:$compose_version"

//    implementation project(':interceptors')
    implementation('io.github.bytebeats:okhttp-analyzer-interceptor:$LATEST_VERSION')//-n means okhttp major version. like 4 means 4.9.3, 3 means 3.14.9
}

Note: LATEST_VERSION : 0.1.3-4

Java
    OkHttpClient.Builder builder = new OkHttpClient.Builder();
     if (BuildConfig.DEBUG) {
         builder.addInterceptor(new OkHttpAnalyzerInterceptor());
     }   
    OkHttpClient client = builder.build();
Kotlin
    val builder = OkHttpClient.Builder()
    if (BuildConfig.DEBUG) {
        builder.addInterceptor(OkHttpAnalyzerInterceptor() )
    }    
    val client = builder.build()
For Retrofit
Java
    OkHttpClient.Builder builder = new OkHttpClient.Builder();
     if (BuildConfig.DEBUG) {
         builder.addInterceptor(new OkHttpAnalyzerInterceptor());
     }   
    OkHttpClient client = builder.build(); 
    Retrofit retrofit = new Retrofit.Builder()
                ......
                .client(client)
                .build();
Kotlin
    val builder = OkHttpClient.Builder()
    if (BuildConfig.DEBUG) {
        builder.addInterceptor( OkHttpAnalyzerInterceptor() )
    }    
    val client = builder.build()
    val retrofit = Retrofit.Builder()
            ......
            .client(client)
            .build()

Stargazers over time

Stargazers over time

Github Stars Sparklines

Sparkline

Contributors

Contributors over time

MIT License

Copyright (c) 2021 Chen Pan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Android part of the Android Studio(Intellij IDEA) OkHttp Analyzer plugin which would analyze details of requests and responses from OkHttpClient.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published