package com.tofly.latte_core.net.interceptor;

import android.util.Log;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Response;

/**
 * @ClassName: CommonResponseInterceptor
 * @Description: 返回通用拦截器
 * @Author: Rivan
 * @CreateDate: 2020/12/28 18:14
 * @UpdateDate: 2020/12/28 18:14
 */
public class CommonResponseInterceptor implements Interceptor {

    private static final String TAG = "ResponseInterceptor";

    @Override
    public Response intercept(Chain chain) throws IOException {
        long requestTime = System.currentTimeMillis();
        Response response = chain.proceed(chain.request());
        //        可以做token的检测.....等等
        Log.e(TAG, "requestTime=: " + (System.currentTimeMillis() - requestTime));
        return response;
    }


}
