title: Best way to config Global Headers for Get, Post, Patch in VueJS
body: <p>I'm new with VueJs, I'm finding best way to config Global Headers for Get, Post, Patch in VueJS, which is <strong>easy to use and strong security</strong>. In the current I just write it in <code>export default {}</code> for every components and it's very bad I know. So I ask you guys to help.</p>
  
  <p>Fixed Thanks to @Hardik Satasiya</p>
  
  <p>~/plugins/axios.js</p>
  
  <p>Every Components:</p>
  
  <pre><code>import axios from 'axios'
  
  var api = axios.create({
    baseURL: 'http://localhost:8000/api/v1/',
    headers: {'Authorization': 'JWT ' + store.state.token}
  })
  
  export default api
  </code></pre>
  
  <p>Issues: Can't tranmit store in to axios.create, so <code>store is not defined</code></p>