public class HttpLoggingInterceptor extends Object implements Interceptor
Interceptor.RequestTags
Constructor and Description |
---|
HttpLoggingInterceptor() |
HttpLoggingInterceptor(org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
after(HttpRequest request,
HttpResponse<?> response,
AsyncBody.Consumer<List<ByteBuffer>> consumer)
Called after a non-WebSocket HTTP response is received.
|
AsyncBody.Consumer<List<ByteBuffer>> |
consumer(AsyncBody.Consumer<List<ByteBuffer>> consumer,
HttpRequest request)
Called before a request to allow the encapsulation of the provided consumer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterFailure, afterFailure, before
public HttpLoggingInterceptor()
public HttpLoggingInterceptor(org.slf4j.Logger logger)
public AsyncBody.Consumer<List<ByteBuffer>> consumer(AsyncBody.Consumer<List<ByteBuffer>> consumer, HttpRequest request)
Interceptor
consumer
in interface Interceptor
consumer
- the original consumer.request
- the HTTP request.public void after(HttpRequest request, HttpResponse<?> response, AsyncBody.Consumer<List<ByteBuffer>> consumer)
Interceptor
Should be used to analyze response codes and headers, original response shouldn't be altered.
after
in interface Interceptor
request
- the original request sent to the server.response
- the response received from the server.Copyright © 2015–2023 Red Hat. All rights reserved.