How to intercept a request when using SpringBoot WebClient

后端 未结 3 588
广开言路
广开言路 2020-12-18 10:26

I am trying to use the WebClient to call my restServices. Previously on RestTemplate, we had ClientHttpRequestInterceptor defined and

3条回答
  •  伪装坚强ぢ
    2020-12-18 11:10

    You can use an ExchangeFilterFunction and configure it on the WebClient instance you’re using. See the Spring Framework reference documentation for more on that.

提交回复
热议问题