add an example for axios global config
This commit is contained in:
parent
fc63f9bd8c
commit
114c46be60
|
@ -15,7 +15,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created(){
|
||||
axios.get("https://axios-test-44b62-default-rtdb.europe-west1.firebasedatabase.app/users.json")
|
||||
axios.get('/users.json')
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
const data = response.data
|
||||
|
|
|
@ -4,6 +4,8 @@ import App from './App.vue'
|
|||
import router from './router'
|
||||
import store from './store'
|
||||
|
||||
import axios from "axios"
|
||||
axios.defaults.baseURL = "https://axios-test-44b62-default-rtdb.europe-west1.firebasedatabase.app"
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
|
|
Reference in New Issue