This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 24
24
package com.owncloud.android.lib.common.http
25
25
26
26
import com.owncloud.android.lib.common.http.LogBuilder.logHttp
27
- import com.owncloud.android.lib.common.http.NetworkNode.*
28
- import com.owncloud.android.lib.common.http.NetworkPetition.*
27
+ import com.owncloud.android.lib.common.http.NetworkNode.BODY
28
+ import com.owncloud.android.lib.common.http.NetworkNode.HEADER
29
+ import com.owncloud.android.lib.common.http.NetworkNode.INFO
30
+ import com.owncloud.android.lib.common.http.NetworkPetition.REQUEST
31
+ import com.owncloud.android.lib.common.http.NetworkPetition.RESPONSE
29
32
import okhttp3.Interceptor
30
33
import okhttp3.Response
31
34
@@ -39,8 +42,8 @@ class LogInterceptor : Interceptor {
39
42
if (httpLogsEnabled) {
40
43
// Log request
41
44
logHttp(REQUEST , INFO , " Type: ${it.request.method} URL: ${it.request.url} " )
42
- it.headers.forEach { header -> logHttp(REQUEST , HEADER , header.toString()) }
43
- logHttp(REQUEST , BODY , it.body.toString())
45
+ it.request. headers.forEach { header -> logHttp(REQUEST , HEADER , header.toString()) }
46
+ logHttp(REQUEST , BODY , it.request. body.toString())
44
47
45
48
// Log response
46
49
logHttp(RESPONSE , INFO , " Code: ${it.code} Message: ${it.message} IsSuccessful: ${it.isSuccessful} " )
You can’t perform that action at this time.
0 commit comments