how can we pass token in vuejs

this.axios
.get(this.getApiUrlByProcess(this.process, "get_categories"),
this.getAuthHeaders())



const query = this.getAuthHeaders();
let input = this.deleteEmptyKeys(this.customer);
this.axios
.post(this.$api.create_customer, input, query)
ss


getAuthHeaders: function() {
const user = this.getUserData();
const customer = $cookies.get("user.customer_slug");
if (user != (null || undefined)) {
this.$apiHeaders["headers"]["Authorization"] = "Bearer " + user.access_token;
this.$apiHeaders["headers"]["X-Customer"] = customer;
}
return this.$apiHeaders;
},






No comments:

Post a Comment

sun dried potato procedure

  Sun-Dried Potato Chips Recipe  https://www.youtube.com/watch?v=e_PVvAU77Qs , recipe for potato sun dried chips 1) ist peel off the potato ...