Jan 14, 2017 02:26 PM|mgebhard|LINK
BUT if I change the "Put" to "Post" on both the client & server then it fails. Why?
It's just about impossible to tell from the posted code. I assume it has something to do with the URL or data.
P.S. Incidentally, the PUT approach was working perfectly except that the method was inadvertently being called twice. I assume this is due to
Idempotency. So I thought the easiest fix would just be to change them to POSTs. I wold very much like to understand the answer to my original question but if someone could also explain to me how to solve
the problem of the method being called twice, that would be great too!
A common cause is the submit button that invokes the AJAX request also causes a form POSTs. This is due to NOT stopping the submit button's default "submit form" behavior. It might also explain the odd behavior described above.
Have you viewing the requests sent using developer tools?