-
POST Request: Signup
- Endpoint: http://127.0.0.1:8080/api/v1/user/signup
This POST request is used to register a new user in the system.
curl -X POST -H "Content-Type: application/json" -d '{
"username": "sample_user",
"email": "sample_user@gmail.com",
"password": "sample_password123"
}' http://127.0.0.1:8080/api/v1/user/signup
-
POST Request: Login
- Endpoint: http://127.0.0.1:8080/api/v1/user/login
This POST request is used to authenticate a user and log them into the system.
curl -X POST -H "Content-Type: application/json" -d '{
"email": "sample_email@gmail.com",
"password": "sample_password123"
}' http://127.0.0.1:8080/api/v1/user/login
-
GET Request: Logout
- Endpoint: http://127.0.0.1:8080/api/v1/user/logout
This GET request is used to log a user out from the system.
curl -X GET http://127.0.0.1:8080/api/v1/user/logout
-
POST Request: Create Room
This POST request is used to create a new room.
curl -X POST -H "Content-Type: application/json" -d '{
"id": "Room 1",
"name": "1"
}' http://127.0.0.1:8080/api/v1/ws/createRoom
Request Body (raw, text):
{
"id": "Room 1",
"name": "1"
}
-
WebSocket Request: Join Room
- Endpoint: ws://localhost:8080/api/v1/ws/joinRoom/67?userId=1&username=sample_user
This WebSocket request is used to join a room with the specified user ID and username.
WebSocket Connection Example:
# Example using WebSocket connection
websocat ws://localhost:8080/api/v1/ws/joinRoom/67?userId=1&username=sample_user
-
GET Request: Get Clients by Room
- Endpoint: http://127.0.0.1:8080/api/v1/ws/get/:1
This GET request is used to retrieve clients by room.
curl -X GET http://127.0.0.1:8080/api/v1/ws/get/1
Path Variables: - 1: The room identifier (replace with the desired room ID).
-
Get Rooms
GET Request: Get Rooms Endpoint: http://127.0.0.1:8080/api/v1/ws/getRooms
This GET request is used to retrieve a list of available rooms.
curl -X GET http://127.0.0.1:8080/api/v1/ws/getRooms