using a Flux and flatMap will do all requests async, then you collectList and block to get the list of strings.

List<Strings> strings = Flux.fromIterable(dataList)
    .flatMap(data -> webclient.post( ... )
            .bodyValue(data)
            .retreive()
            .bodyToMono(String.class))
    .collectList()
    .block();
Answer from Toerktumlare on Stack Overflow
🌐
LogicBig
logicbig.com › tutorials › spring-framework › spring-webflux › web-client.html
Spring 5 - WebClient Example
public class WebClientExample2 { public static void main(String[] args) throws InterruptedException { WebClient webClient = WebClient.create("http://localhost:8080"); Mono<String> result = webClient.get() .retrieve() .bodyToMono(String.class); result.subscribe(WebClientExample2::handleResponse); System.out.println("After subscribe"); //wait for a while for the response Thread.sleep(1000); } private static void handleResponse(String s) { System.out.println("handle response"); System.out.println(s); } }
🌐
Piotr's TechBlog
piotrminkowski.com › home › using reactive webclient with spring webflux
Using Reactive WebClient with Spring WebFlux - Piotr's TechBlog
December 1, 2020 - We can easily access it with non-blocking Spring WebFlux WebClient. The following test starts with a sample Spring WebFlux application, defines WebClient instance, and subscribes to the response stream.
🌐
HowToDoInJava
howtodoinjava.com › home › spring webflux › spring webclient (with hands-on examples)
Spring WebClient (with Hands-On Examples)
September 14, 2023 - Mono<ClientResponse> responseMono = webClient.get() .uri("/employees/{id}", 123) .exchange(); responseMono.subscribe(clientResponse -> { HttpStatus statusCode = clientResponse.statusCode(); // HTTP Status HttpHeaders headers = clientResponse.headers(); // HTTP Headers Mono<Employee> employeeMono = clientResponse.bodyToMono(Employee.class); // Response Body // Handle the response, including error handling based on status code }); Here’s an example of how to use exchangeToMono() to make a GET request with Spring WebClient and handle the response: @Service public class MyService { private final
🌐
Packt Publishing
hub.packtpub.com › implementing-a-non-blocking-cross-service-communication-with-webclienttutorial
Implementing a non-blocking cross-service communication with WebClient[Tutorial]
February 13, 2019 - Here, we use the bodyToMono method, which converts the incoming payload of the User to Mono, shown at point (5). Finally, we can build the processing flow of the incoming response using the Reactor API, and execute the remote call by calling the subscribe method. WebClient follows the behavior described in the Reactive Streams specification.
🌐
Medium
medium.com › @shivibh › reactive-error-and-response-handling-with-spring-webclient-a-deep-dive-cd476105d885
Reactive Error and Response Handling with Spring WebClient: A Deep Dive | by Shivi Bhardwaj | Medium
October 9, 2024 - Spring WebClient, part of Spring WebFlux, offers a reactive and non-blocking approach to making HTTP calls, allowing your application to handle asynchronous tasks efficiently. This post will explore how to handle responses and errors reactively, using WebClient, and demonstrate the subscribe and publish patterns for managing both success and failure scenarios.
🌐
Spring
spring.io › guides › gs › reactive-rest-service
Getting Started | Building a Reactive RESTful Web Service
The WebClient class uses reactive features, in the form of a Mono to hold the content of the message (returned by the getMessage method).
Find elsewhere
🌐
Medium
medium.com › swlh › spring-boot-webclient-cheat-sheet-5be26cfa3e
Spring Boot WebClient Cheat Sheet | by Stan Wein | The Startup | Medium
April 22, 2023 - NOTE: As of 5.0 this class is in maintenance mode, with only minor requests for changes and bugs to be accepted going forward. Please, consider using the org.springframework.web.reactive.client.WebClient which has a more modern API and supports sync, async, and streaming scenarios.
🌐
Baeldung
baeldung.com › home › spring › spring web › spring webclient
Spring WebClient | Baeldung
November 25, 2025 - Keep in mind that if we defined a default base URL for the WebClient, this last method would override this value. Then we can set a request body, content type, length, cookies, or headers if we need to. For example, if we want to set a request body, there are a few available ways.
🌐
Reflectoring
reflectoring.io › spring-webclient
Sending HTTP requests with Spring WebClient
May 25, 2021 - To do this, you can use HTTP Toolkit, a cross-platform open-source tool that can capture traffic from a wide variety of Java HTTP clients, and which includes a specific integration to automatically intercept Spring WebClient.
🌐
Medium
medium.com › @pradeepisuru31 › mastering-spring-webclient-a693f90447f0
Mastering Spring WebClient. A Comprehensive Guide for… | by Isuru Pradeep | Medium
June 22, 2025 - @Bean public WebClient webClient() { return WebClient.builder() .baseUrl("https://api.example.com") .clientConnector(new ReactorClientHttpConnector( HttpClient.create().followRedirect(true) )) .build(); } Mono<User> user = webClient.get() .uri("/users/{id}", 123) .retrieve() .bodyToMono(User.class); // Async handling (non-blocking) user.subscribe( response -> System.out.println("User: " + response), error -> System.err.println("Error: " + error) ); Flux<User> users = webClient.get() .uri("/users") .retrieve() .bodyToFlux(User.class); users.subscribe( user -> System.out.println("Received: " + u
🌐
GeeksforGeeks
geeksforgeeks.org › advance java › spring-webflux-webclient
Spring Webflux WebClient - GeeksforGeeks
April 11, 2025 - A client for making HTTP requests is included in Spring WebFlux. The Reactor-based WebClient API allows a declarative mixture of asynchronous functionality without requiring knowledge of threads or concurrency.
🌐
Baeldung
baeldung.com › home › spring › spring webflux › execute synchronous requests using webclient
Execute Synchronous Requests Using WebClient | Baeldung
September 4, 2024 - When sending an HTTP request, WebClient returns one of two reactive data types from the Reactor Core library – Mono or Flux. These return types represent streams of data, where Mono corresponds to a single value or an empty result, and Flux refers to a stream of zero or multiple values. Having an asynchronous and non-blocking API lets the caller decide when and how to subscribe, keeping the code reactive.
🌐
HowToDoInJava
howtodoinjava.com › home › spring webflux › spring boot webclient post example
Spring Boot WebClient POST Example
September 14, 2023 - Then we can submit the multipart form data by using the method BodyInserters.fromMultipartData(builder.build()) and send a normal request as in the previous examples. webClient.post() .uri("/employees") .contentType(MediaType.MULTIPART_FORM_DATA) .body(BodyInserters.fromMultipartData(builder.build())) .retrieve() .toEntity(Employee.class) .doOnError(WriteTimeoutException.class, ex -> { System.err.println("WriteTimeout"); }) .subscribe(responseEntity -> { System.out.println("Status: " + responseEntity.getStatusCode().value()); System.out.println("Location URI: " + responseEntity.getHeaders().getLocation().toString()); System.out.println("Created New Employee : " + responseEntity.getBody()); }); Generally, there is no need to send the query parameters in a POST request.
🌐
DZone
dzone.com › coding › languages › reactive programming in java: using the webclient class
Reactive Programming in Java: Using the WebClient Class
August 28, 2019 - From the moment we create the instance of the class WebClient, I specify the URL of the request.
🌐
CalliCoder
callicoder.com › home › topics › spring boot › spring webclient and webtestclient tutorial with examples
Spring WebClient and WebTestClient Tutorial with Examples | CalliCoder
November 14, 2017 - WebClient is Spring’s non-blocking HTTP client, introduced with the reactive stack and now the default recommendation for calling remote services. RestTemplate still works and is still maintained for bug fixes, but it receives no new features, so new code that talks HTTP should be using one of the fluent clients. Two things this guide covers that short examples skip: there is no response timeout unless you configure one, and retrieve() turns a 404 into a thrown exception whether or not you meant it to.
🌐
DZone
dzone.com › software design and architecture › integration › efficient api communication with spring webclient
Efficient API Communication With Spring WebClient - DZone
May 26, 2025 - The WebClient is a reactive HTTP client in Spring WebFlux. Its main advantage is asynchronic, non-blocking communication between microservices or external APIs.
🌐
Piotr's TechBlog
piotrminkowski.wordpress.com › 2019 › 11 › 04 › using-reactive-webclient-with-spring-webflux
Using Reactive WebClient with Spring WebFlux – Piotr's TechBlog
November 4, 2019 - We can easily access it with non-blocking WebClient. The following test starts sample Spring WebFlux application, defines WebClient instance and subscribes to the response stream.