it is still useful when classic-form functionalities are used.
The execution will be everything in one line ajaxForm(form).then().catch()
Currently urlencoded header formdata and method post must be set. Whit ajaxform none is needed
The only caveat is when headers are required so implement the optional "{options}" method as well, to allow adding headers (tokens, etc)
ajaxForm(form[,options]).then().catch()
will replace
var formData = new FormData(form)
const headers = new Headers()
headers.set('content-type', 'application/x-www-form-urlencoded')
const data = `user=${user}&password=${password}`
ir.ajax(form.action, { method: 'POST', headers , body: data }).then().catch()
Was removed before to clean theAPI buuuuut:
it is still useful when classic-form functionalities are used.
The execution will be everything in one line ajaxForm(form).then().catch()
Currently urlencoded header formdata and method post must be set. Whit ajaxform none is needed
The only caveat is when headers are required so implement the optional "{options}" method as well, to allow adding headers (tokens, etc)
will replace