[Vuejs]-Error in creating a http request in vue

0👍

Pass the route as parameter so you can reuse the same function, and the input should also be a parameter, you are trying to post (nothing)

store(route, input) {
            if(input != '') {
                this.$http.post(route, input)
                .then(resp => {
                    this.post = []; // empty your session post object

          window.setTimeout(function(){ window.location = 
  resp.body.redirect },5); // redirect
                })
            }
        },

Leave a comment