title: Why I am getting 400 Error on Ajax request
body: <p>I stuck while in the WP AJAX.</p>
  
  <pre><code>jQuery.ajax({
      type: 'POST',
      url: spaceajax.ajaxurl, // this have my admin ajax URL
      data: {
          "event_id"  : 1,
          "space_id"  : 1,
          "booking_id": 1,
          'action'    : 'requestContract'
      },
      success: function(result) {
          alert("Success!");
      }
  });
  </code></pre>
  
  <p>in my functions.php </p>
  
  <pre><code>function requestContract(){
      echo "Checkpoint"; die; 
  }
  
  add_action( 'wp_ajax_requestContract', 'requestContract' );
  add_action( 'wp_ajax_nopriv_requestContract', 'requestContract' );
  </code></pre>
  
  <p>Now I am getting 400 Bad request error. Any guess what I am doing wrong?</p>