add up request

This commit is contained in:
Sem van der Hoeven
2023-05-29 14:08:06 +02:00
parent 1f4fbb2246
commit 73709a257f
2 changed files with 14 additions and 0 deletions

View File

@@ -67,6 +67,12 @@
}
function up() {
console.log("up");
var xhr = new XMLHttpRequest();
xhr.setRequestHeader("Content-Type", "application/json");
xhr.open("POST", "/move_up", true);
var data = JSON.stringify({"speed": 1});
xhr.send(data);
}
function down() {
console.log("down");