Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 673 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 673 Bytes

Reactive Product API

This API is example usage of the Spring Webflux to build a Reactive API on top of the Observer Design Pattern.

Build

mvn clean install

Run

mvn clean spring-boot:run

Test

Get all the products as a normal HTTP request:

curl -X GET http://localhost:8787/products -H 'Accept: application/json' --verbose

Get all the products as subsciption requisition using Server Sent Events:

curl -X GET http://localhost:8787/products -H 'Accept: text/event-stream' --verbose

Get a non stop interval event stream:

curl -X GET http://localhost:8787/products/events -H 'Accept: text/event-stream' -N --verbose