Permalink
Browse files

:)

  • Loading branch information...
itkacher committed Oct 20, 2018
1 parent 790efa8 commit 9f1c32067f525ebb0a78453ce1cfa8bef201180f
@@ -1,22 +1,43 @@
# OkHttpProfiler

For activating you need to include library to your android ``build.gradle`` file (module level)
OkHttp Profiler plugin can show request from okhttp library directly in your Android Studio toolwindow.
It supports okhttp v3 (http://square.github.io/okhttp/) or Retrofit v2 (https://square.github.io/retrofit/)
![Screen1](https://github.com/itkacher/OkHttpProfiler/blob/master/screen1.png?raw=true)
---
For installation you need to include library to your app build.gradle file

implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:0.0.1'

``implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:0.0.1'``
and add Interceptor to okHttpClient
and add Interceptor to okHttpClient in code
##### For OkHttp
###### Java

Java
OkHttpClient mClient = new OkHttpClient.Builder().addInterceptor( new OkHttpProfilerInterceptor() ).build();

``OkHttpClient mClient = new OkHttpClient.Builder().addInterceptor( new OkHttpProfilerInterceptor() ).build();``
Kotlin
###### Kotlin

``val client = OkHttpClient.Builder().addInterceptor( OkHttpProfilerInterceptor() ).build()``
val client = OkHttpClient.Builder().addInterceptor( OkHttpProfilerInterceptor() ).build()

## Then install Android Studio / Intellij IDE plugin
##### For Retrofit
###### Java
OkHttpClient mClient = new OkHttpClient.Builder().addInterceptor( new OkHttpProfilerInterceptor() ).build();
Retrofit retrofit = new Retrofit.Builder()
......
.client(client)
.build()
###### Kotlin
val client = OkHttpClient.Builder().addInterceptor( OkHttpProfilerInterceptor() ).build()
val retrofit = Retrofit.Builder()
......
.client(client)
.build()

####And then enable Android Studio plugin

https://plugins.jetbrains.com/plugin/11249-okhttp-profiler
![Screen2](https://github.com/itkacher/OkHttpProfiler/blob/master/plugin_install1.png?raw=true)
![Screen3](https://github.com/itkacher/OkHttpProfiler/blob/master/plugin_install2.png?raw=true)

Have fun!
####Have fun!

![Screen1](https://github.com/itkacher/OkHttpProfiler/blob/master/screen1.png?raw=true)
![Screen2](https://github.com/itkacher/OkHttpProfiler/blob/master/screen2.png?raw=true)
![Screen4](https://github.com/itkacher/OkHttpProfiler/blob/master/screen2.png?raw=true)
@@ -1,5 +1,6 @@
{
"aliceblue": [240, 248, 255, 1],
"empty":[],
"antiquewhite": [250, 235, 215, 1],
"aqua": [0, 255, 255, 1],
"aquamarine": [127, 255, 212, 1],
BIN +203 KB plugin_install1.png
Binary file not shown.
BIN +116 KB plugin_install2.png
Binary file not shown.
BIN -23.8 KB (96%) screen1.png
Binary file not shown.
BIN +365 KB toolbar.png
Binary file not shown.

0 comments on commit 9f1c320

Please sign in to comment.