forked from j62/ctbrec
1
0
Fork 0

Code cleanup

This commit is contained in:
0xboobface 2020-06-12 18:22:12 +02:00
parent cd6175a7eb
commit 06029a1331
1 changed files with 2 additions and 2 deletions

View File

@ -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();