Class DifyRestLoggingInterceptor
java.lang.Object
io.github.guoshiqiufeng.dify.client.spring6.logging.DifyRestLoggingInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class DifyRestLoggingInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
A logging interceptor for RestClient requests and responses.
This interceptor logs the request and response details including headers, body, and timing.
- Since:
- 2025/4/29 16:30
- Version:
- 0.11.0
- Author:
- yanghq
-
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)
-
Constructor Details
-
DifyRestLoggingInterceptor
public DifyRestLoggingInterceptor()
-
-
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
-