Spring boot Web-socket playground
Getting Started
To get a local copy up and running follow these simple example steps.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
- java v11+
Installation
- Clone the repo
git clone https://github.com/p8ul/java-spring-boot-websocket-playground.git
- Install packages
mvn install
Usage
Run WebsocketsdemoApplicataion
then open your browser and navigate to http://localhost:8080
You can send an message by entering a text on the message input and clicking send button or use send a request to localhost:8080/send-message
curl --location --request POST 'localhost:8080/send-message' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=od0BPOSlRpUHEeWOa6QaedIOuCId7MHx7zbQBSGRCfTRCyb8DwMzU0Wu6Z26IW38; sessionid=eyuamddu7tvnni6wvsxux8y96dxzhgvq' \
--data-raw '{
"messageContent": "world"
}'