Good afternoon I have a little problem with the vue

Currently I am doing a project where I have to consume API with vue, the problem I have is that I have an input with a data and I want to pull it to an api put

modificarGlover: function () {
var url = “https://localhost:44321/api/Personas/Actualizar?id=” +;
this.$http.put(url, this.Glovers).then(function (response) {

Since the api call is an async function, best practices normally need you to create a seperate function as an async function that calls the data, and as soon as u get the data, u r good to go. Something like this
data () {
return {
id: ‘’
methods: {
async getGlovers () {
const url = “https://localhost:44321/api/Personas/Actualizar?id=”
await this.$http.put(url, this.Glovers).then(response => { }).catch(error => { // error })
fetchGlovers () {
// do something


Please use code syntax so people can read it…

In order to receive the best answers to your questions please follow these simple guidelines.

  1. Be descriptive about your question or problem and be sure to include any errors. Single line topics will rarely receive answers and do not just post a screenshot.
  2. Provide examples of the code in question and use syntax highlighting .
  3. Breakdown the issue in your code and provide a link to an example that replicates it. Use JSFiddle , CodePen , JSBin , or CodeSandbox .

Following these few steps will greatly improve your chances of getting a good quality answer to your issue. Remember, everyone is here to share ideas and to help out using their own free time. Making an effort to craft a well thought out topic pays tribute to this.