I got the token when I logged in and stored it in localStorage. I want to know how to request data on axios
console.log(localStorage.getItem("token")); //
//
beforeCreate() {
this.axios
.post(`/api/services/app/role/GetRoles`, {
permission: ""
})
.then(response => {
console.log(response.data.result);
})
.catch(function(error) {
console.log(error);
});
}
};
I would like to ask how to bring token to request data. Thank you for your answer