|
@@ -1,5 +1,6 @@
|
1
|
1
|
package com.xhly.corelib.network
|
2
|
2
|
|
|
3
|
+import CustomLogInterceptor
|
3
|
4
|
import android.annotation.SuppressLint
|
4
|
5
|
import android.util.Log
|
5
|
6
|
import com.xhly.corelib.Const
|
|
@@ -35,7 +36,7 @@ object RetrofitService {
|
35
|
36
|
|
36
|
37
|
private fun getClient(): OkHttpClient {
|
37
|
38
|
|
38
|
|
- val interceptor = HttpLoggingInterceptor { message ->
|
|
39
|
+ /* val interceptor = HttpLoggingInterceptor { message ->
|
39
|
40
|
try {
|
40
|
41
|
val text: String = URLDecoder.decode(message, "utf-8")
|
41
|
42
|
LogShow("OKHttp-----"+text)
|
|
@@ -50,7 +51,8 @@ object RetrofitService {
|
50
|
51
|
}
|
51
|
52
|
}
|
52
|
53
|
}
|
53
|
|
- interceptor.level = HttpLoggingInterceptor.Level.BODY
|
|
54
|
+ interceptor.level = HttpLoggingInterceptor.Level.BODY*/
|
|
55
|
+ val interceptor=CustomLogInterceptor()
|
54
|
56
|
return OkHttpClient.Builder()
|
55
|
57
|
/* .proxy(Proxy.NO_PROXY)*/
|
56
|
58
|
.retryOnConnectionFailure(true)
|