Class ContentPreviewingService

All Implemented Interfaces:
Unwrappable, HttpService, Service<HttpRequest,​HttpResponse>

public final class ContentPreviewingService
extends SimpleDecoratingHttpService
Decorates an HttpService 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.
     ...
 });