title: How to write an AJAX call without passing any data
body: <p>I want to pass an AJAX call without passing any data. What is the correct way I am getting error 500. I have tried the following code: </p>
  
  <pre><code>function loaddata(){
      $.ajax({
             url: 'ListCustomer',
             data: {
  
             },
             error: function(xhr, statusText, err) {
               alert("error"+xhr.status);
             },
  
             success: function(data) {
               alert(data);
             },
             type: 'GET'
          });
  }
  </code></pre>
  
  <p>I am using spring mvc.method is calling but has an error.</p>