title: error 400 method POST
body: <p>Everytime I run my ajax jquery function I get an error 400</p>
  
  <p>this is my code, the Postman tests are all positive, but when the webapp runner, it does not work, I do not know if it depends on code or html5
  Somebody can help me?</p>
  
  <p>JavaScript</p>
  
  <pre><code>function add() {
  
  var url= "http://localhost:8080/bip/workAdd";
  
  var work = {
      codiceCommessa: document.getElementById("codiceCommessa").value,
      commessaMainSub: document.getElementById("commessaMainSub").value,
      settoreCliente: document.getElementById("settoreCliente").value,
      nomeCliente: document.getElementById("nomeCliente").value,
      clienteFinale: document.getElementById("clienteFinale").value,
      titoloQuals: document.getElementById("titoloQuals").value,
      keyWorrdsTopic: document.getElementById("keyWordsTopic").value,
      keyWordsActivities: document.getElementById("keyWordsActivities").value,
      anno: parseInt(document.getElementById("anno").value),
      dataInizio: document.getElementById("dataIniziale").value,
      dataFine: document.getElementById("dataFinale").value,
      referente: document.getElementById("referente").value,
      referenteDocumentazione: document.getElementById("referenteDocumentazione").value,
      sviluppatore: document.getElementById("sviluppatore").value,
      path: document.getElementById("path").value
  
  
  };
  
  
  
  $.ajax({
  
      contentType: "application/json; charset=utf-8",
      'Access-Control-Allow-Headers': '*',
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'POST',
  
      type: "POST",
      url: url,
      data: work,
  
      dataType: "html or json",
      success: function (data, status, jqXHR) {
          console.log("saved"),
  
      },
  
      error: function (jqXHR, status) {
  
                      console.log("error")
  
  
      }
  
  });
  </code></pre>