Skip to content Skip to sidebar Skip to footer

Ajax Delete Returns 200 But Firing Off Error Event

I have read through loads of posted threads and none seem to deal with delete. My code is returning a 200 status yet fires of the error event... $.ajax({

Solution 1:

The problem was that there was no dataType defined. I added dataType: 'text' and I resolved my problem.

Solution 2:

I think it's because of type: 'DELETE'. Change it to type: 'JSON' or remove it at all. Since you are returning wrongly formatted response, you get error callback fired. Safe if you specify json type and echo anything besides of json string.

Post a Comment for "Ajax Delete Returns 200 But Firing Off Error Event"