Search code examples
jqueryhttprequestput

How to send a PUT/DELETE request in jQuery?


GET:$.get(..)

POST:$.post()..

What about PUT/DELETE?


Solution

  • You could use the ajax method:

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