Answer the question
In order to leave comments, you need to log in
How to make a POST request with Axios?
How to make a POST request with Axios.
methods: {
clear () {
this.$refs.login.reset()
},
logIn: function () {
Axios.post('http://192.168.1.116:8000', {
login: this.name,
password: this.password
})
.then(()=>{
console.log('qqwe')
this.$router.replace(this.$route.query.redirect || '/tamam')
})
.catch(function (err) {
console.log('q')
})
},
}
Answer the question
In order to leave comments, you need to log in
Because you are not accepting a response from the server:
.then((response)=>{
console.log(response.data);
this.$router.replace(this.$route.query.redirect || '/tamam')
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question