July 2018
Intermediate to advanced
268 pages
7h 36m
English
Spring WebFlux includes a reactive client named WebClient, enabling us to perform HTTP requests in a non-blocking manner and to use reactive streams. WebClient can be used as an alternative to RestTemplate, which is used more traditionally. WebClient exposes reactive ClientHttpRequest and ClientHttpResponse objects. The bodies of these objects consist of reactive Flux<DataBuffer>, as opposed to traditional blocking stream implementation (InputStream and OutputStream).
Create an instance of WebClient, perform a request, and then handle the response. The following is a code snippet showing the WebClient usage:
WebClient client = WebClient.create("http://any-domain.com");Mono<Movie> movie = client.get() .url("/movie/{id}", ...Read now
Unlock full access