From b3a51f064c4dfb27f54cd9526803338d2e8dc296 Mon Sep 17 00:00:00 2001
From: Runt <qingingrunt2010@qq.com>
Date: Sat, 13 Aug 2022 16:26:49 +0000
Subject: [PATCH] 添加注释,部分优化

---
 app/src/main/java/com/runt/open/mvvm/retrofit/Interceptor/HttpLoggingInterceptor.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/app/src/main/java/com/runt/open/mvvm/retrofit/Interceptor/HttpLoggingInterceptor.java b/app/src/main/java/com/runt/open/mvvm/retrofit/Interceptor/HttpLoggingInterceptor.java
index 59cb698..556ec33 100644
--- a/app/src/main/java/com/runt/open/mvvm/retrofit/Interceptor/HttpLoggingInterceptor.java
+++ b/app/src/main/java/com/runt/open/mvvm/retrofit/Interceptor/HttpLoggingInterceptor.java
@@ -31,7 +31,7 @@
  * @purpose Created by Runt (qingingrunt2010@qq.com) on 2020-10-21.
  */
 
-public class HttpLoggingInterceptor extends EncryptInterceptor {
+public class HttpLoggingInterceptor extends AddHeadersInterceptor {
 
     final String TAG = "HttpLogging";
 
@@ -65,7 +65,6 @@
         try {
             logArrays.addAll(getRequestLog(request));
             int position = logArrays.size() +2;
-            //request = encryptRequest(request);//加密
             response = chain.proceed(request);
             logArrays.addAll(getResponseLog(response));
             NetWorkCost netWorkCost = NetWorkListenear.workCostMap.get(hashCode);
@@ -109,6 +108,11 @@
         return response;
     }
 
+    /**
+     * 请求数据信息
+     * @param request
+     * @return
+     */
     private ArrayList<String> getRequestLog(Request request) throws IOException, JSONException {
         RequestBody requestBody = request.body();
         ArrayList<String> logArrays = new ArrayList<>();
@@ -175,7 +179,13 @@
 
     }
 
-
+    /**
+     * 返回的数据信息
+     * @param response
+     * @return
+     * @throws IOException
+     * @throws JSONException
+     */
     private ArrayList<String> getResponseLog(Response response) throws IOException, JSONException {
         ArrayList<String> logArrays = new ArrayList<>();
         ResponseBody responseBody = response.body();

--
Gitblit v1.9.1