@Override
        @NonNull
        public Response intercept(final Interceptor.Chain chain) throws IOException {
            final Request request = chain.request();
            final String reqLogStr = request.method() + " " + hidePassword(request.url().toString());

            Log.d("HTTP-REQ:" + reqLogStr + ", headers=[" + headerToString(request.headers()) + "]");

            final long before = System.currentTimeMillis();
            try {
                final Response response = chain.proceed(request);
                final String protocol = " (" + response.protocol() + ')';
                final String redirect = request.url().equals(response.request().url()) ? "" : " (=> " + response.request().url() + ")";
                if (response.isSuccessful()) {
                    Log.d("HTTP-RESP:" + response.code() + formatTimeSpan(before) + reqLogStr + protocol + redirect + ", headers=[" + headerToString(response.headers()) + "]");
                } else {
                    Log.d("HTTP-RESP:" + response.code() + " [" + response.message() + "]" + formatTimeSpan(before) + reqLogStr + protocol + ", headers=[" + headerToString(response.headers()) + "]");
                }
                return response;
            } catch (final IOException e) {
                Log.w("HTTP-ERROR:" +  formatTimeSpan(before) + reqLogStr + " (" + e + ")", e);
                throw e;
            }
        }
Add headers to HTTP request.

@param request   the request builder to add headers to
@param headers   the headers to add (in addition to the standard headers), can be null
@param cacheFile if non-null, the file to take ETag and If-Modified-Since information from
main/src/main/java/cgeo/geocaching/network/Network.java