Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikfig/7908cfffdc910bf02c45edd89bdc1faf to your computer and use it in GitHub Desktop.
Save erikfig/7908cfffdc910bf02c45edd89bdc1faf to your computer and use it in GitHub Desktop.
axios.js
import axios from 'axios'
// export default ({ Vue }) => {
// Vue.prototype.$axios = axios
// }
export default ({ Vue }) => {
Vue.prototype.$axios = axios.create({
baseURL: 'http://localhost:8765/',
withCredentials: true,
timeout: 1000,
headers: {
'Content-Type': 'application/vnd.api+json',
'Accept': 'application/vnd.api+json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjExLCJleHAiOjE1MzQ5NTkyNjR9.uGz9Y8mmJbqGmuaXyECICR8UkXyHyVC-hN4NeOsCRgw'
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment