JQuery ajax delete request
I have a rest service which does a DELETE. I am able to successfully invoke this rest service through curl. The command which I used was;
- curl --request DELETE http://localhost:7080/airavata-rest-services/registry/api/descriptors/hostdescriptor/delete?hostName=temp
I have a Jquery client which tries to do the above but I don't see the hostName param in the request. Am I missing anything in the way in which I create the request?
- var hostName = $("#hostName1").val();
- var deleteUrl = "http://localhost:7080/airavata-rest-services/registry/api/descriptors/hostdescriptor/delete";
- $.ajax({
- type: "DELETE",
- url: deleteUrl,
- data: {
- "hostName": hostName
- }
- }).done(function( msg ) {
- alert( "Host Deleted: " + msg );
- });