[Vuejs]-How to send form data in vue to variable as json using axios?

1👍

at first you should have a route to submit this form data to, then you can submit the form like this:

axios.post('http://localhost:3030/api/new/post', 
    this.productName,
    this.productModel,
    this.prodDescription,
    this.prodPrice,
    { headers: {
      'Content-type': 'application/x-www-form-urlencoded',
      }
    }).then(response => ....);

Leave a comment