Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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