Ajax-запросы
let data = new FormData();
data.append('param1', 'value1');
fetch('', {
method: 'post',
headers: {
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
},
body: data
}).then(function(resp) {
if(resp.status == 200){
resp.text().then(function(resp){
console.log(resp);
});
}
});