File size: 552 Bytes
7095e83
 
821299e
7095e83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function run_commands() {
    const command = document.getElementById('command').value;
    fetch('/commands', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({ command: command })
    })
    .then(response => response.text())
    .then(data => {
        console.log(data);
    });
}

function callFunctionTwo() {
    fetch('/function_two', {
        method: 'POST'
    })
    .then(response => response.text())
    .then(data => {
        console.log(data);
    });
}