Package com.logicaldoc.util.http
Class LoggingHttpClientResponseHandler<T>
java.lang.Object
org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<T>
com.logicaldoc.util.http.LoggingHttpClientResponseHandler<T>
- All Implemented Interfaces:
org.apache.hc.core5.http.io.HttpClientResponseHandler<T>
- Direct Known Subclasses:
FileHttpClientResponseHandler
,StreamHttpClientResponseHandler
,StringHttpClientResponseHandler
public abstract class LoggingHttpClientResponseHandler<T>
extends org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<T>
An extension of the starndard HttpClientReponseHandler that also logs the
content of the response in case of error
- Since:
- 8.9.3
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getResponseBody
(org.apache.hc.core5.http.ClassicHttpResponse response) static String
getResponseBody
(org.apache.hc.core5.http.ClassicHttpResponse response, Integer maxLength) handleResponse
(org.apache.hc.core5.http.ClassicHttpResponse response) Methods inherited from class org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler
handleEntity
-
Constructor Details
-
LoggingHttpClientResponseHandler
public LoggingHttpClientResponseHandler()
-
-
Method Details
-
handleResponse
- Specified by:
handleResponse
in interfaceorg.apache.hc.core5.http.io.HttpClientResponseHandler<T>
- Overrides:
handleResponse
in classorg.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<T>
- Throws:
IOException
-
getResponseBody
public static String getResponseBody(org.apache.hc.core5.http.ClassicHttpResponse response) throws IOException - Throws:
IOException
-
getResponseBody
public static String getResponseBody(org.apache.hc.core5.http.ClassicHttpResponse response, Integer maxLength) throws IOException - Throws:
IOException
-