File size: 400 Bytes
3e76441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
async function sendText() {

    const text = document.getElementById("textInput").value;

    const response = await fetch("/api/process", {
        method: "POST",
        headers: {
            "Content-Type": "application/json"
        },
        body: JSON.stringify({text: text})
    });

    const data = await response.json();

    document.getElementById("result").innerText = data.result;
}