vue axios usage

May be used in the front end of the rear end (vue, Node.js)

usage:

- npm install axios

After installation is complete, you need to import the file using the

import asiox from 'asiox'

const http = {

  get(url) {

   return axios ({

      url,

      method: 'GET'

    })

  }

}

export default http // expose interfaces

Then import it where needed

Guess you like

Origin www.cnblogs.com/sunyang-001/p/11105876.html