axios-module icon indicating copy to clipboard operation
axios-module copied to clipboard

method spoofing is not working

Open sergeevpasha opened this issue 4 years ago • 3 comments

const formData = new FormData() formData.append('_method', 'PATCH') formData.append('signature', data.signatureFile, data.signatureName) $axios .$post(/v1/users/1, formData, { headers: { "Content-Type": "multipart/form-data" } })

The same example works fine in vue + axios, but it's not working in nuxt + nuxt-axios-module

sergeevpasha avatar May 30 '20 13:05 sergeevpasha

Hey, Sorry for the late response.
Did you manage to find the root cause of the issue?

farnabaz avatar Mar 11 '21 16:03 farnabaz

@farnabaz Barely remember, but seems like I change from $axios.$post to $axios.post and that helped

sergeevpasha avatar Mar 14 '21 10:03 sergeevpasha

Thank you for the response, I think this should be fix in the latest, because module does not add any logic to these functions. And the result should be same in latest version. https://github.com/nuxt-community/axios-module/blob/main/lib/plugin.js#L45-L47

farnabaz avatar Mar 15 '21 09:03 farnabaz