bbg-ajax
v1.0.4
Published
ajax
Downloads
1
Readme
usage
Installation
npm install mk-ajax
Demo
js
import { ajax, interceptors, setOpt } from 'mk-ajax'
Vue.prototype.$ajax = ajax;
//request interceptor
//interceptors.request.use(config => {
// return config
//}, error => {
//return Promise.reject(error)
//})
//response interceptor
//interceptors.response.use((response) => {
//return response
//}, (error) => {
//Promise.resolve(error.response)
//});
//setOpt({defaults:{withCredentials:false}});
Methods
Method|Description|Parameters -|-|- post|''|{} get|''|{} jsonp|''|{}
Reference
Contributor
licuiting