ajax-vue

0.0.2 • Public • Published

Ajax-Vue

Vue Ajax plugin

Install

npm install ajax-vue

Usage

//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)})

API

Vue.$ajax(url[,options])

url

type: String,
request URL

options

type: Object

*options.method:*
type: String,
default: 'GET'

*options.data:*
type: Object
query for request

*options.dataType*
type: String
default: 'json'

Readme

Keywords

Package Sidebar

Install

npm i ajax-vue

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

12.8 kB

Total Files

7

Last publish

Collaborators

  • jetyan