-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
When I try to use formData and the status changes online, the request goes with the empty object "data";
//the eRequests localStorage data
[{method: "post", url: "http://localhost/gibucket/forms/submit_form_data", data: {}}]
0: {method: "post", url: "http://localhost/gibucket/forms/submit_form_data", data: {}}
data: {}
method: "post"
url: "http://localhost/gibucket/forms/submit_form_data"
My javascript code
var data = new FormData();
data.append('form_name', this.form_name);
data.append('form_data', JSON.stringify(form_data));
var req = new Request();
req.send({
method: 'post',
url: route.route,
data: data,
}).then(response => {
console.log(response.data);
}).catch(function (error) {
console.log(error);
});
when online this works perfect so the code is fine. what is not right is that the data object is stored empty in the localstorage
itsalb3rt
Metadata
Metadata
Assignees
Labels
No labels