Answer the question
In order to leave comments, you need to log in
When building a vue project, does it swear at an axios request?
Hello! I built the vue project, started the web server in Django and my project was displayed. The routes work fine, the components are displayed correctly, but there is a problem with axios. In main.js (before building the project) I wrote:
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
Vue.config.productionTip = false
import axios from "axios"
Vue.use(axios)
Vue.use(Vuetify)
new Vue({
router,
store
})
get() {
axios
.get('127.0.0.1:8000/api/company/1/')
.then(response => (
this.test = response
)
);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question