PUT method with vue.js and phalcon

0

I would like to know if someone can explain to me how to send a form pr media of x-www-urlencoded en vue.js? since the enctype attribute is not working for me, and if I send the form with formData () it arrives empty to the API.

I would greatly appreciate the person who can explain.

    
asked by YohaBR 05.03.2018 в 16:13
source

1 answer

0

Using the library github.com/pagekit/vue-resource :

To send the information with the type of content that you say:

var url = "http://urlatuapi.com";
var datos = {a : 1, b: 2};
this.$http.put(url, datos, { header: { 
                               'Content-Type':'application/x-www-form-urlencoded'
                           }
 }).then(function(){});
    
answered by 07.03.2018 в 15:50