|
@ -16,9 +16,24 @@ const connect = async (token) => { |
|
|
{"X-Authorization": token}, |
|
|
{"X-Authorization": token}, |
|
|
(frame) => { |
|
|
(frame) => { |
|
|
console.log("Connected", frame); |
|
|
console.log("Connected", frame); |
|
|
|
|
|
|
|
|
|
|
|
const requestUrl = "/app/simple"; |
|
|
|
|
|
let params = { |
|
|
|
|
|
tratata: 1, |
|
|
|
|
|
gratata: 0 |
|
|
|
|
|
} |
|
|
|
|
|
stomp.send( |
|
|
|
|
|
requestUrl, |
|
|
|
|
|
JSON.stringify(params) |
|
|
|
|
|
); |
|
|
|
|
|
stomp.subscribe("/user/simple", (results, errors)=>{ |
|
|
|
|
|
console.log("results: ", results); |
|
|
|
|
|
console.log("errors: ", errors); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
error => { |
|
|
error => { |
|
|
console.error("Disconnected"); |
|
|
|
|
|
|
|
|
console.error("Disconnected: ", error); |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|