Skip to content
Advertisement

Cannot pass a personilized header with axios

I hava an application doing a CRUD, but when i try to use the method delete, i keep getting a 406 (Not Acceptable), I’m using an API formated in json_api, so i need personalized headers, in all other methods its working, but only delete not.

My axios.js

JavaScript

My headers.js

JavaScript

And my editUnit.vue

JavaScript

The code referent to the delete method is between line 68-86

And my error in the api terminal is:

JavaScript

EDIT: enter image description here

Advertisement

Answer

The delete function is not correct

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement