0

I have a simple jQuery that makes a post request to my API. If the API endpoint is decorated with the ValidateAntiForgeryToken attribute the post fails. I noticed that if I remove the ValidateAntiForgeryToken attribute the post is successful. I am not a jQuery lover and I have not idea how to solve it. This is part of my jQuery.

$.post("/api/endpoint", data, function (d) {
            if (d == "OK") {
                editDialog.modal('hide');
            }
        });
Bug
  • 832
  • 2
  • 9
  • 37

0 Answers0