I called the GET REST API by executing the following code:
$.getJSON('http://myapisite.com/user/1?callback=?', function(msg){ console.log(msg); });
But to call the DELETE REST API via jquery I tried:
$.ajax({ url: 'http://mysite.com/user/1?callback=?', type: 'DELETE', dataType: 'json', data: '', success: function(response) { console.log('PUT completed'+response); } });.
and this api is not being called, I want to know how I should call the DELETE REST API.
thanks
source share