@@ -3,7 +3,6 @@ package com.foke.together.util.retrofit
33import com.foke.together.util.AppLog
44import com.foke.together.util.AppPolicy
55import okhttp3.Request
6- import okhttp3.ResponseBody
76import okio.IOException
87import okio.Timeout
98import retrofit2.Call
@@ -17,15 +16,14 @@ class NetworkCall<T>(
1716 call.enqueue(object : Callback <T > {
1817 override fun onResponse (call : Call <T >, response : Response <T >) {
1918 if (AppPolicy .isDebugMode) {
20- AppLog .e(TAG , " onResponse" , " success: $response " )
21- AppLog .e(TAG , " onResponse" , " success: ${response.headers()} " )
22-
23- val body = response.body() as ResponseBody
24- AppLog .e(TAG , " onResponse" , " success: ${response.body()} " )
25- AppLog .e(TAG , " onResponse" , " success: ${body.source()} " )
26- AppLog .e(TAG , " onResponse" , " success: ${body.contentLength()} " )
27- AppLog .e(TAG , " onResponse" , " success: ${body.contentType()} " )
28- AppLog .e(TAG , " onResponse" , " success: ${body.bytes()} " )
19+ AppLog .e(TAG , " onResponse" , " >>>>>>>>>>>>>>>>> start >>>>>>>>>>>>>>>>>" )
20+ AppLog .e(TAG , " onResponse" , " response: $response " )
21+ AppLog .e(TAG , " onResponse" , " headers: ${response.headers()} " )
22+ response.raw().body?.run {
23+ AppLog .e(TAG , " onResponse" , " contentType: ${this .contentType()} " )
24+ AppLog .e(TAG , " onResponse" , " contentLength: ${this .contentLength()} " )
25+ }
26+ AppLog .e(TAG , " onResponse" , " <<<<<<<<<<<<<<<<<< end <<<<<<<<<<<<<<<<" )
2927 }
3028
3129 if (response.isSuccessful) {
0 commit comments