You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider following axios implementation of arguments:
// Provide aliases for supported request methodsutils.forEach(['delete','get','head'],functionforEachMethodNoData(method){/*eslint func-names:0*/Axios.prototype[method]=function(url,config){returnthis.request(utils.merge(config||{},{method: method,url: url}));};});utils.forEach(['post','put','patch'],functionforEachMethodWithData(method){/*eslint func-names:0*/Axios.prototype[method]=function(url,data,config){returnthis.request(utils.merge(config||{},{method: method,url: url,data: data}));};});
therefore data is passed as config when delete method of the form is called.
If the form would have a field called 'data', there will be a silent error before the request is even made.
here is an example:
constform=newForm({data: 'this will fail before request'});form.delete('item/1')// no request is made.then(data=>alert('done!')).catch(error=>alert('something is gone wrong!'));// catch fires with TypeError: _this.data is not a function
The text was updated successfully, but these errors were encountered:
Please consider following axios implementation of arguments:
therefore data is passed as config when delete method of the form is called.
If the form would have a field called 'data', there will be a silent error before the request is even made.
here is an example:
The text was updated successfully, but these errors were encountered: