From
http://docs.jquery.com/Ajax/jQuery.ajax#options"
The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
"
- Richard
On Thu, Jul 3, 2008 at 11:23 AM, Yosifov Pavel <
bulg@...> wrote:
Can somebody show example how to send via AJAX DELETE HTTP method
instead of POST, like this:
$.post( '/filial/del/', {city:$.trim(city)} );
but DELETE.
I tried:
$.ajax( {url:'/filial/del/', type:'DELETE',
data:'city='+encodeURI($.trim(city))} );
and:
$.ajax( {url:'/filial/del/', dataType:'json', type:'DELETE', data:
{'city':$.trim(city)}} );
but in django vie see that no any 'city' in POST or GET! Is this
possible? I don't see any DELETE in jQuery source...