Anti Forgery Token Axios Asp .net Core
Hi i am able to send a post using vue js axios to a controller in Asp .NET Core 2.2 like this axios({ url: '/Parametros/Create',
Solution 1:
Changing __RequestVerificationToken
to RequestVerificationToken
in the header made a post request work for me.
Final code:
axios({
method: 'post',
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val()},
url: 'home/axiostest',
})
...
Post a Comment for "Anti Forgery Token Axios Asp .net Core"