ajax请求设置header

来源:互联网 发布:泰国明星互动软件 编辑:程序博客网 时间:2024/05/22 11:50
$.ajax({     url: "http://abc.de.com",     dataType: 'json',     type: 'GET',     beforeSend: function (xhr) {         xhr.setRequestHeader("token", "tokenvalue");     },     async: false,     cache: false,     //contentType: 'application/x-www-form-urlencoded',     success: function (sResponse) {     }  });