Class ContentPreviewingClient

All Implemented Interfaces:
Client<HttpRequest,​HttpResponse>, HttpClient, Unwrappable

public final class ContentPreviewingClient
extends SimpleDecoratingHttpClient
Decorates an HttpClient to preview the content of Requests and Responses.

Note that this decorator just sets RequestOnlyLog.requestContentPreview() and RequestLog.responseContentPreview(). You can get the previews using RequestLogAccess.


 RequestLogAccess logAccess = ctx.log();
 logAccess.whenComplete().thenApply(log -> {
     // Call log.requestContentPreview() and log.responseContentPreview() to use them.
     ...
 });