npm.io
1.1.1 • Published 1 month ago

@varlet/axle

Licence
MIT
Version
1.1.1
Deps
5
Size
43 kB
Vulns
36
Weekly
0
Stars
120

AXLE

Progressive request tool based on axios.

Documentation | 中文介绍

version stars vue license


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/axle
Basic 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.

Keywords