Spring WebClient: How to stream large byte[] to file?
问题 It seems like it the Spring RestTemplate isn't able to stream a response directly to file without buffering it all in memory. What is the proper to achieve this using the newer Spring 5 WebClient ? WebClient client = WebClient.create("https://example.com"); client.get().uri(".../{name}", name).accept(MediaType.APPLICATION_OCTET_STREAM) ....? I see people have found a few workarounds/hacks to this issue with RestTemplate , but I am more interested in doing it the proper way with the WebClient