How to send a PUT/DELETE request in jQuery?

user198729 picture user198729 · Jan 28, 2010 · Viewed 536.6k times · Source

GET:$.get(..)

POST:$.post()..

What about PUT/DELETE?

Answer

Darin Dimitrov picture Darin Dimitrov · Jan 28, 2010

You could use the ajax method:

$.ajax({
    url: '/script.cgi',
    type: 'DELETE',
    success: function(result) {
        // Do something with the result
    }
});