title: set Jquery AJAX properties with javascript object
body: <p>I am making a call in jquery ajax and while the same code when defining the ajax properties 'from scratch' works, when setting the same values in a javascript object and then define the ajax request with the properties of the object respectively in the server i can't access them.
  While this works:</p>
  
  <pre><code>    var onsuccess =function (data){
          console.log(data)
          makeArchiveRequest();
      }
      var onerror = function (data){
          console.log(data)
      }
      $.ajax({
          url: 'makeDBEntry/archive',
          data: formData,
          contentType: false,
          processData: false,
          type: "POST",
          success: function(data){
              onsuccess(data)
          },
          error:function (data) {
             onerror(data);
          }
      });
  </code></pre>
  
  <p>this doesn't work :</p>
  
  <pre><code>    var req = {
          type    :"POST",
          data    : formData,
          url     : 'makeDBEntry/archive',
          contentType: false,
          processData: false,
  
      };
  
      $.ajax({
          url: req["url"],
          data: req["data"],
          contentType: req["data"],
          processData: req["processData"],
          type: req["type"],
          success: function(data){
              onsuccess(data)
          },
          error:function (data) {
             onerror(data);
          }
      });
  </code></pre>
  
  <p>I just cant figure out what I am doing wrong;</p>