title: how can axios interceptor handler get access to vue component instance(this pointer)within whose created method is invoking axios.get?
body: <p>Axios is a great library capable of doing ajax both in browser and in node environment. vuejs is a great framework used for component based web development. Normally, it is excellent for a vue comonent to use axios to launch ajax operation.
  According to <a href="https://github.com/imcvampire/vue-axios" rel="nofollow noreferrer">https://github.com/imcvampire/vue-axios</a> , we can use following code to integrate vue and axios.</p>
  
  <pre><code>import Vue from 'vue'
  import axios from 'axios'
  import VueAxios from 'vue-axios'
  Vue.use(VueAxios, axios)
  Vue.prototype.$http.interceptors.request.use(function(request){
      // I want to access the vuecomponent instance here, how can i do that??
      console.log((this.$options._componentTag ? (this.$options._componentTag+ 
     ' of '+ (this.$parent.$options._componentTag? 
     this.$parent.$options._componentTag:'root')): 'root component')+ ' for 
     url: ' 
     +request.url+ ' body: '+JSON.stringify(request.body))
  }
     return request
  },function(error){ return Promise.reject(error)});
  // normally, following code will be run within vue component created hook 
     method, this represent the vuecomponent, $http is axio
  this.$http.get(api).then((response) =&gt; {
     console.log(response.data)
  })
  </code></pre>
  
  <p>and, also, i'd like to know in which vue component the ajax operation is being executed. So, i use the interceptors to address that problem.
  Unfortunately, this pointer does not represent the vuecomponent, how can i implement that?</p>