Class RestTemplateLoggingFilter
java.lang.Object
info.ejava.examples.svc.content.RestTemplateLoggingFilter
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class RestTemplateLoggingFilter
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) private StringreadString(InputStream inputStream) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.client.ClientHttpRequestInterceptor
andThen, apply
-
Constructor Details
-
RestTemplateLoggingFilter
public RestTemplateLoggingFilter()
-
-
Method Details
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException - Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Throws:
IOException
-
readString
- Parameters:
inputStream-- Returns:
- input stream as one string
-