Answer the question
In order to leave comments, you need to log in
How to pass json via axios to vue?
https://stackoverflow.com/questions/45347112/vuejs...
Tried both post and path but something is wrong
create(){
var obj = {
"title": this.title
}
this.$http.path(
url,
obj,
{ headers: {
Authorization: `Bearer ${localStorage.getItem('token')}` }
}
).then(({ data }) => {
console.log(data)
alert('tadam')
});
},
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