JQuery ajax delete request

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;

  1. 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?

  1.         var hostName = $("#hostName1").val();
  2.         var deleteUrl = "http://localhost:7080/airavata-rest-services/registry/api/descriptors/hostdescriptor/delete";

  3.         $.ajax({           
  4.             type: "DELETE",
  5.             url: deleteUrl,
  6.             data: {
  7.                 "hostName": hostName
  8.             }
  9.         }).done(function( msg ) {
  10.                 alert( "Host Deleted: " + msg );
  11.             });