-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
plugin_initial.html
91 lines (89 loc) · 2.7 KB
/
plugin_initial.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>No data found</title>
<style>
.code {
padding:10px;
background:#ccdcde45;
color:blue;
display: inline-block;
}
</style>
</head>
<body style="padding:10px;">
<h1>OkHttpProfiler Plugin</h1>
<h2>
<a href="https://youtu.be/KI_1-rUMjEI?si=EpXpMZncTNf53wxB&t=458">Video instruction on YouTube.com</a>
</h2>
<h2>
<a href="https://www.youtube.com/watch?v=TrGYjPizNAQ">New OkHttp Request Modifier library</a>
</h2>
<h3>
<p>Developers Eugene Tkachenko && Hanna Tkachenko</p>
<p>
We don't receive any data from your android device.
</p>
</h3>
<p>OkHttp Profiler plugin can show request from okhttp library directly in your Android Studio toolwindow.
It supports okhttp v3 (<a href="http://square.github.io/okhttp/" rel="nofollow">http://square.github.io/okhttp/</a>)
or Retrofit v2 (<a href="https://square.github.io/retrofit/" rel="nofollow">https://square.github.io/retrofit/</a>)
</p>
<hr>
<h2>For installation you need to include library to your app build.gradle file</h2>
<div class="code">implementation 'io.nerdythings:okhttp-profiler:1.1.1'</div>
<p>and add Interceptor to okHttpClient in code</p>
<h2>For OkHttp</h2>
<h3>Java</h3>
<div class="code">
OkHttpClient.Builder builder = new OkHttpClient.Builder();<br/>
if (BuildConfig.DEBUG) {<br/>
 builder.addInterceptor(new OkHttpProfilerInterceptor());<br/>
}<br/>
OkHttpClient client = builder.build();<br/>
</div>
<h3>Kotlin</h3>
<div class="code">
val builder = OkHttpClient.Builder()<br/>
if (BuildConfig.DEBUG) {<br/>
 builder.addInterceptor(OkHttpProfilerInterceptor())<br/>
}<br/>
val client = builder.build()<br/>
</div>
<h2>
For Retrofit
</h2>
<h3>
Java
</h3>
<div class="code">
OkHttpClient.Builder builder = new OkHttpClient.Builder();<br/>
if (BuildConfig.DEBUG) {<br/>
 builder.addInterceptor(new OkHttpProfilerInterceptor());<br/>
}<br/>
OkHttpClient client = builder.build();<br/>
Retrofit retrofit = new Retrofit.Builder()<br/>
 ......<br/>
 .client(client)<br/>
 .build();<br/>
</div>
<h3>
Kotlin
</h3>
<div class="code">
val builder = OkHttpClient.Builder()<br/>
if (BuildConfig.DEBUG) {<br/>
 builder.addInterceptor(OkHttpProfilerInterceptor())<br/>
}<br/>
val client = builder.build()<br/>
val retrofit = Retrofit.Builder()<br/>
 ......<br/>
 .client(client)<br/>
 .build()<br/>
</div>
<p>
More details by link: <a href="https://github.com/itkacher/OkHttpProfiler">https://github.com/itkacher/OkHttpProfiler</a>
</p>
</body>
</html>