Spring reactive web clients

This is a pretty new feature which was added in Spring Framework 5. It enables us to interact with HTTP services, using the reactive paradigm.

It is not a replacement for a RestTemplate provided by Spring, however, it is an addition to working with reactive applications. Do not worry, the RestTemplate is an excellent and tested implementation for interaction with HTTP services in traditional applications.

Also, the WebClient implementation supports the text/event-stream mime type which can enable us to consume server events.

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.