List of usage examples for org.springframework.web.reactive.function.client ClientResponse statusCode
HttpStatus statusCode();
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()); }/*www . j ava 2 s . c om*/ return Mono.delay(Duration.ofSeconds(1)); } return response.bodyToMono(this.props.getSource().getType()).map(value -> message(response, value)); }