美文网首页
jquery 发送ajax请求 设置auth头

jquery 发送ajax请求 设置auth头

作者: yanghanbin_it | 来源:发表于2017-06-09 10:23 被阅读0次

jquery设置ajax请求的头信息

$.ajax({
        url: url + '?t=' + new Date().getTime(),
        type: type,
        data: data,
        dataType: 'json',
        beforeSend: function (xhr) {
            xhr.setRequestHeader("Authorization", common.AUTOORIZATION);
        },
        success: function (res) {
        }
});

相关文章

网友评论

      本文标题:jquery 发送ajax请求 设置auth头

      本文链接:https://www.haomeiwen.com/subject/xcctqxtx.html