Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

spring reactive web client throw exception test

Mono<MyCustomResponse> result = webClient.post()
            .header(HttpHeaders.CONTENT_TYPE, "application/json")
            .body(BodyInserters.fromObject(request))
            .retrieve()
            .subscribe(response -> log.info(response),
                       throwable -> throw new CustomException(throwable.getMessage()));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spring #reactive #web #client #throw #exception #test
ADD COMMENT
Topic
Name
9+3 =