List of usage examples for org.springframework.web.reactive.function.client ClientResponse bodyToMono
<T> Mono<T> bodyToMono(ParameterizedTypeReference<T> elementTypeRef);
From source file:org.springframework.cloud.function.web.source.HttpSupplier.java
private Mono<?> transform(ClientResponse response) { HttpStatus status = response.statusCode(); if (!status.is2xxSuccessful()) { if (this.props.isDebug()) { logger.info("Delaying supplier based on status=" + response.statusCode()); }// ww w . j av a2 s .c o m return Mono.delay(Duration.ofSeconds(1)); } return response.bodyToMono(this.props.getSource().getType()).map(value -> message(response, value)); }