Advertisement
krot

axios default params

Oct 29th, 2020
2,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.$axios.defaults.params=this.$axios.defaults.params || {};
  2.         this.$axios.defaults.params['token'] = token;
  3.         /*  this.$axios.interceptors.request.use((config) => {
  4.             config.params = config.params || {};
  5.             config.params['token'] = 'test';
  6.             return config;
  7.         });
  8.  this.$axios.defaults.headers.common['Z'] = `token:${token}`  
  9. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement