forked from j62/ctbrec
Code cleanup
This commit is contained in:
parent
cd6175a7eb
commit
06029a1331
|
@ -11,7 +11,7 @@ import okhttp3.Response;
|
||||||
|
|
||||||
public class LoggingInterceptor implements Interceptor {
|
public class LoggingInterceptor implements Interceptor {
|
||||||
|
|
||||||
private static final transient Logger LOG = LoggerFactory.getLogger(LoggingInterceptor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(LoggingInterceptor.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Response intercept(Chain chain) throws IOException {
|
public Response intercept(Chain chain) throws IOException {
|
||||||
|
@ -19,7 +19,7 @@ public class LoggingInterceptor implements Interceptor {
|
||||||
Request request = chain.request();
|
Request request = chain.request();
|
||||||
LOG.debug("OkHttp Sending request {} on {}\n{}", request.url(), chain.connection(), request.headers());
|
LOG.debug("OkHttp Sending request {} on {}\n{}", request.url(), chain.connection(), request.headers());
|
||||||
if(request.method().equalsIgnoreCase("POST")) {
|
if(request.method().equalsIgnoreCase("POST")) {
|
||||||
LOG.debug("Body: {}", request.body().toString());
|
LOG.debug("Body: {}", request.body());
|
||||||
}
|
}
|
||||||
Response response = chain.proceed(request);
|
Response response = chain.proceed(request);
|
||||||
long t2 = System.nanoTime();
|
long t2 = System.nanoTime();
|
||||||
|
|
Loading…
Reference in New Issue