1.0.8 ā¢ Published 3 years ago
@easy-uniapp/api v1.0.8
Welcome to @easy-uniapp/api š
Easy Uni-App Api
š Homepage
Install
# yarn
yarn add @easy-uniapp/api
# npm
npm install @easy-uniapp/api --save
Usage
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
Author
š¤ godtail i@tech.top
- Github: @easy-uniapp
š¤ Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2020 godtail <i@tech.top>.
This project is MIT licensed.
This README was generated with ā¤ļø by readme-md-generator