1.0.4 • Published 4 years ago

mo-axios v1.0.4

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

mo-axios

personal axios package

Install

$ npm i mo-axios -S

Usage

main.js

import moAxios from 'mo-axios'

Vue.prototype.$get = moAxios.get;
Vue.prototype.$post = moAxios.post;
Vue.prototype.$setMoAxios = moAxios.setMethod;

App.vue

this.$setMoAxios({
  LogFailed: () => {
    // statements
  },
  LogSuccess: () => {
    // statements
  },
});

this.$post("url",{}).then(rsp=>{
  //  statements
}).catch(err={
  //  statements
});

this.$get("url",{}).then(rsp=>{
  //  statements
}).catch(err={
  //  statements
});
1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago