$.ajax({
type:"get",
url:'http://localhost:8000/api/chunnels/',
headers:{
"Authorization":localStorage.getItem("token"),
},
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Authorization", localStorage.token);
},
success:function(data) {
console.log('Chunnel', data)
}
})
pardon110
相关分类