public class LoggingInterceptor implements okhttp3.Interceptor { public static String TAG = "LogInterceptor"; @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); long startTime = System.currentTimeMillis(); Response response = chain.proceed(chain.request()); long endTime = System.currentTimeMillis(); long duration=endTime-startTime; MediaType mediaType = response.body().contentType();
okhttp拦截器的实现
最新推荐文章于 2023-06-19 17:42:02 发布