Getting Started
Overview
Axle is a progressive request tool based on axios. It does not destroy the original abilities of axios, and helps you process requests more easily.
Installation
shell
npm i @varlet/axle -Sshell
yarn add @varlet/axleshell
pnpm add @varlet/axleBasic Usage
Axle normalizes the parameters of the request function, and expands more request functions for different interface requirements.
js
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: {} })