FormData is choking the server
This commit is contained in:
parent
58d173da75
commit
5ea31a7050
|
@ -410,13 +410,11 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
web.setDir = function () {
|
web.setDir = function () {
|
||||||
const dir = document.getElementById('dir').checked;
|
const dir = !document.getElementById('dir').checked;
|
||||||
const formData = new FormData()
|
|
||||||
console.log('set to => ' + dir)
|
console.log('set to => ' + dir)
|
||||||
formData.append('json', JSON.stringify({ dir : dir }))
|
|
||||||
const opts = {
|
const opts = {
|
||||||
method : 'POST',
|
method : 'POST',
|
||||||
body : formData
|
body : JSON.stringify({ dir : dir })
|
||||||
};
|
};
|
||||||
console.dir(opts)
|
console.dir(opts)
|
||||||
fetch('/dir', opts)
|
fetch('/dir', opts)
|
||||||
|
|
Loading…
Reference in New Issue