Search⌘ K
AI Features

Playing With Reactive and Classic Endpoints

Explore how to test both reactive and classic API endpoints using cURL commands that handle Server-Sent Events. Understand the differences in response times and data streaming between blocking and non-blocking calls in Spring WebFlux, and observe how reactive patterns require both client and server support to be truly effective.

Let’s test our API endpoints using cURLA command-line tool that supports Server-Sent Events so we can have a look at the blocking and non-blocking alternatives in our application.

On Educative, the execution of the curl command will be automatically handled. However, the commands are still shown so that you may also learn how to perform the testing yourself.

Paged version of the reactive endpoint

First, we will try the paged version of the reactive endpoint. When testing locally, you can use the following command for this purpose.

$ curl "http://localhost:8080/quotes-reactive
...