Easy Uni-App Api
npm install @easy-uniapp/api!Version

> Easy Uni-App Api
``shyarn
yarn add @easy-uniapp/api
Usage
`javascript
import api from '@easy-uniapp/api'const api = new Api()
const isDev = process.env.NODE_ENV === 'development'
const baseUrl = isDev ? '[developmentServer]' : '[productServer]'
api.setConfig({
baseUrl,
beforeRequest: async (requestOptions) => {
// do something...
},
beforeResponse: async (ret) => {
// do something...
},
})
export default api
``š¤ godtail
- Github: @easy-uniapp
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a āļø if this project helped you!
Copyright Ā© 2020 godtail .
This project is MIT licensed.
---
_This README was generated with ā¤ļø by readme-md-generator_