When using WebClient just to replace RestTemplate, i.e. every call is synchronous, do I have still to choose between a Flux or Mono response or does it not matter anymore because it is synchronous anyway?
As an example:
Mono<List<Customer>> response = this.apiClient.getWebClient()
.put()
.uri(URI.create("http://localhost:8080/api/v1/"))
.body(BodyInserters.fromValue(StammdatenBaseError.builder().build()))
.retrieve()
.bodyToMono(new ParameterizedTypeReference<Customer>() {});
List<Customer> customers = response.block(); // .block() induces the call to be a synchronous one.
Makes it a difference if the return type is Flux<List<Customer>>
or not?
The thing is that here it is explained to use Flux for Collections and Mono for single values but I don't know if this applies also for the good old sync approach?