Share your favourite music with friends right now!
{
"method": ...,//one of {INIT, JOIN, LEAVE, ROOMS, UPLOAD}
// fields for given method
}
Each of method has different body request and reponse:
INIT
: requires fieldname
with user name. Auth can be done only once.JOIN
: requires fieldroomName
- swiches currently used by user room. When given room does not exist, server will create it. When after room change there will be no more clients in given room, it will be destroyed.LEAVE
: moves client outside of the room.UPLOAD
: sending to server request for sending file to it.