Forked from timeelementopuro/gist:345944c768a0c9292cd64034cff77802
Created
August 15, 2018 18:31
-
-
Save erikfig/7908cfffdc910bf02c45edd89bdc1faf to your computer and use it in GitHub Desktop.
axios.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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