spring-boot-demo
spring-boot-demo copied to clipboard
【WEB系列】WebClient之retrieve与exchange的使用区别介绍 | 一灰灰Blog
http://spring.hhui.top/spring-blog/2020/07/28/200728-SpringBoot%E7%B3%BB%E5%88%97WebClient%E4%B9%8Bretrieve%E4%B8%8Eexchange%E7%9A%84%E4%BD%BF%E7%94%A8%E5%8C%BA%E5%88%AB%E4%BB%8B%E7%BB%8D/
前面介绍了几篇WebCilent的使用姿势博文,其中大部分的演示case,都是使用retrieve来获取返回ResponseBody,我国我们希望获取更多的返回信息,比如获取返回头,这个时候exchange则是更好的选择; 本文将主要介绍一下,在WebClient中retrieve和exchange的各自使用场景