$.ajax({
url:"xxx",
async:true,
dataType:"json",
contentType:"application/json",
data:{},
beforeSend: function (XMLHttpRequest) {XMLHttpRequest.setRequestHeader("Authorization", "bearer xxxxxxxxxx");}
success:function(result){}
});
http://www.w3school.com.cn/jquery/ajax_ajax.asp
ajax添加header信息
猜你喜欢
转载自www.cnblogs.com/xsj1989/p/9768064.html
今日推荐
周排行