async function send(userID, asset){ data={ userID: userID, asset: asset } let response = await fetch('/submit', { method: 'POST', headers: { 'Content-Type': 'application/json;charset=utf-8' }, body: JSON.stringify(data) }) let result = await response.json(); console.log(response.json) document.getElementById("input").innerHTML=result.text }