1.0.2 • Published 8 years ago

axios-normal-response v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

axios-normal-response

NPM version npm download

Install

$ npm i axios-normal-response --save

Usage

import normalResponse 'axios-normal-response';

// optional custom code msg map, example: options = { responseCodeMsg: { 401: '禁止访问', 404: '未知资源' } }
normalResponse.setResponseCodeMsg(options);

axios.interceptors.response.use(normalResponse.succResponseHandle,
  normalResponse.errResponseHandle);

Example

Questions & Suggestions

Please open an issue here.

License

MIT