Fetch Method Post przekazanie postu Dodaj PHP
// if you are going to use post method you need to send the data/body using the formdata object
var url = '/your/url';
var formData = new FormData();
formData.append('x', 'hello');
fetch(url, { method: 'POST', body: formData })
.then(function (response) {
return response.text();
})
.then(function (body) {
console.log(body);
});
Dizzy Dugong