Answer the question
In order to leave comments, you need to log in
How to organize the formdata object so that it looks like this?
There is an error when sending FormData POST data using the method.
Data should be transmitted in the following way:
Headers
Form Data:
LoginForm[email]:234
LoginForm[password]:234
LoginForm[rememberMe]:0
LoginForm[rememberMe]:1
function submit(form){
var formData = new FormData();
formData.append('LoginForm[email]', form.email);
formData.append('LoginForm[password]', form.password);
// OR
formData.append('LoginForm', form)
}
------WebKitFormBoundaryraUeNL6VjAnyGIUh
Content-Disposition: form-data; name:"LoginForm[email]"
[email protected]
------WebKitFormBoundaryraUeNL6VjAnyGIUh
Content-Disposition: form-data; name="LoginForm[password]"
123456
------WebKitFormBoundaryraUeNL6VjAnyGIUh--
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question