This is a sample live score application that shows how to use Server-Sent Events:
- Spring Webflux
What are the Server Sent Events and More..
Run this using the gradle:
gradle bootRun
This will start the application on port 8080.
curl --location --request POST 'http://localhost:8080/api/v1/live-scores' \
--header 'Content-Type: application/json' \
--data-raw '{
"homeTeam": "Arsenal",
"awayTeam": "Tottenham",
"homeScore": 1,
"awayScore": 1
}'
curl --location --request GET 'http://localhost:8080/api/v1/live-scores'