[Vuejs]-How to set http cookie in axios interceptor?

0👍

Something as simple as this should get you going in the right direction:

axios.interceptors.response.use(response => {
  if (response.data.token) {
    window.localStorage.setItem('token', response.data.token)
  }
});

Leave a comment