Vue Ajax plugin
npm install ajax-vue
//In main.js
import Vue from 'vue'
import Ajax from './assets/index'
Vue.use(Ajax)
// In example.js
// responseText will be shown in console
Vue.$ajax('http://example.com',{data:{name:'jet'}}).then(() => {console.log(data)})
type: String,
request URL
type: Object
*options.method:*
type: String,
default: 'GET'
*options.data:*
type: Object
query for request
*options.dataType*
type: String
default: 'json'