Spring ClientHttpRequestInterceptor Explanation

I'm not sure how the interceptor works and what it is useful for. Also, why use ClientHttpRequestInterceptor over AsyncClientHttpRequestInterceptor (or vice versa)?

In particular:

Should the interception function be implemented on the interface and in the background, or is there sufficient base? How, where and when the function is called and how is data passed to the function?

The only difference I see between a regular interceptor and an asynchronous from docs is that in normal mode you have the option to "wrap the response to filter HTTP attributes" and in asynchronous mode you can "adapt the response to filter HTTP attributes with using the abstract ListenableFutureAdapter class. "

+3


source to share





All Articles