how to load data with Vue axios?

-1

I am starting to develop a project with nodeJs, express and sequelize (postgresSQL), I want to add the functions that Vue Axios offers to this project but I can not understand how this library works. If someone here who can help me with an example or material I would appreciate it

    
asked by Andres Dlc 13.11.2018 в 20:43
source

1 answer

0

Axios is a tool that allows you to consume and display data from an API and can be used in a framework like Vue. If you really want to consume an API with Axios, the first thing you have to do is install Axios in your project. Go through npm or yard. Then you can start using it. Here I show you an example of a get that allows you to obtain the data.

created () {     axios.get (url)     .then (response = > {
      this.info = response     })

Remember that the url is your route to reach the API that connects directly to your database.

    
answered by 14.11.2018 / 04:12
source