It would be really useful if AsyncRestTemplate was capable of handling some async-friendly variant of ClientHttpRequestInterceptor's.
I understand the same interceptors are not possible, because the current interface assumes sync behaviour:
ClientHttpResponse intercept(HttpRequest request, byte body, ClientHttpRequestExecution execution)
But it would be very useful to be able to hook and alter the requests before they are executed. Something like:
HttpRequest intercept(HttpRequest request)
would probably be enough, in order to be able to easily add some headers in a centralized way. The actual execution would be done outside of the scope of the async interceptor - just being able to modify/replace the request would be very useful by itself.
+1 For this functionality, the request interceptors are the only extension points of the RestTemplate giving possibility to define custom behaviour from logging, to request tracing or authorization that could be simply plug-in, it would great if AsyncRestTemplate would mimic the behaviour of RestTemplate in this matter.