尝试从浏览器中插入查询无效

时间:2019-05-27 10:21:25

标签: jquery ajax

我尝试通过邮递员及其工作尝试此ajax查询,但是当我尝试从mi JSF页面启动查询ajax无效时,这是我的代码:

      $.ajax({
        type : "POST", 
        url : "http://localhost:8080/users",
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        },
        dataType: "json",
       data:{ "nombre":"fdgdgfdsg" ,"edad":"21", "cp": "41020", "direccion": "dsgsdfgdfg", "telefono": "654123456", "dni": "81301635Q", "apellidos": "sdfasfsadfafs", "correo": "aasdfasdf@gmail.com" },

        success: function (data) {

      },
      error: function (xhr, ajaxOptions, thrownError) {
    console.log(JSON.stringify(data));    
    console.log(xhr.status.message);
        console.log(thrownError.message);
        console.log(xhr.responseText.message);
        console.log(xhr.message);
      }


    });   
}

0 个答案:

没有答案