I eliminated jQuery from the project in favor of axios, but when I try to validate the __RequestVerificationToken, the controller responds with:
The required anti-forgery form field "__RequestVerificationToken" is not present
I see that the data is sent in json format and with jquery as form data.
Is there any way for the Controller to detect the json format or do I need to serialize the data before sending it?
axios({
url: '/api/controller/method',
data: {
__RequestVerificationToken,
otherData
},
method: 'post'
})