# vben-simple-axios

> vben的axios封装修改一下

Latest version **1.0.4** (published 2022-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install vben-simple-axios
pnpm add vben-simple-axios
yarn add vben-simple-axios
bun add vben-simple-axios
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-07-27 |
| First published | 2022-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wjc |
| Maintainers | wangjinchuan |

## Links

- npm: https://www.npmjs.com/package/vben-simple-axios
- Homepage: https://gitee.com/jinchuanwang/vben-simple-axios
- npm.io page: https://npm.io/package/vben-simple-axios

## Recent versions

- 1.0.4 (latest) — 2022-07-27
- 1.0.3 — 2022-07-27
- 1.0.2 — 2022-07-27
- 1.0.1 — 2022-07-27
- 1.0.0 — 2022-07-27

## README

## 使用

```ts
// http.ts
import { VAxios } from 'vben-simple-axios'

interface RequestOptions {}

interface Result<T = any> {}

export const http = new VAxios<RequestOptions, Result>({
  transform: {
    // 见axiosTransform.ts
  },
  requestOptions: {
    // 默认的RequestOptions，可以被覆盖
  },
  // axios配置...
})


// api.ts
import { http } from 'http.ts'
export const testApi = (data) => {
  return http.post({
    url: 'xxx',
    data
  }, {
    // RequestOptions
  })
}
```

---
_Source: https://npm.io/package/vben-simple-axios · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
