https post

This commit is contained in:
barwie2@st.amu.edu.pl 2020-03-09 23:11:50 +01:00
parent 391ed435b9
commit d61db9e56e
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,6 @@ var server = http.createServer(function (request, response) {
console.log(e);
}
});
}
else {
response.end("Undefined request .");

View File

@ -47,7 +47,9 @@
<script>
var classes_code_input = $('#classes_code_input').html();
const client = new WebSocket('wss://atcheck.projektstudencki.pl/wss', classes_code_input);
client.onclose = function(event) {
console.log("WebSocket is closed now.");
};
client.onmessage = function onmessage1(message) {
message = JSON.parse(message.data);
if (message.type = "data") {