Package Exports
- @varlet/axle
- @varlet/axle/api
- @varlet/axle/use
Readme
Intro
Progressive request tool based on axios. It does not destroy the original abilities of axios, and helps you process requests more easily.
Features
- 🚀 Normalized request functions with expanded methods for different response types
- 💪 Vue Composition API support with loading status, error status, upload/download progress, lifecycle, and more
- 🛠️ Built-in practical request/response interceptors
- 💡 Enhanced API definition with
createApi - 🌍 Full compatibility with axios configuration
Install
# npm
npm i @varlet/axle -S
# yarn
yarn add @varlet/axle
# pnpm
pnpm add @varlet/axleBasic Usage
import { createAxle } from '@varlet/axle'
const axle = createAxle(/** @see https://axios-http.com **/)
axle.get('/url', { current: 1, pageSize: 10 }, { headers: {} })
axle.post('/url', { name: 'Axle' }, { headers: {} })Documentation
For full documentation, please visit the documentation site.