Я получаю сообщение об ошибке при попытке получить строки из интерфейса
function sendStringData(stringToTransmit) {
fetch('/api/processString', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ data: stringToTransmit })
})
.then(response => response.json())
.then(result => {
console.log('Backend response:', result);
})
.catch(error => {
console.error('Error sending data:', error);
});
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... to-backend