# jiuto_axios

> axios package

Latest version **1.0.3** (published 2021-02-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install jiuto_axios
pnpm add jiuto_axios
yarn add jiuto_axios
bun add jiuto_axios
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-02-14 |
| First published | 2021-02-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jiuto |
| Maintainers | jiuto |

## Links

- npm: https://www.npmjs.com/package/jiuto_axios
- Repository: https://github.com/Jiuto/jiuto_axios
- Homepage: https://github.com/Jiuto/jiuto_axios#readme
- Issues: https://github.com/Jiuto/jiuto_axios/issues
- npm.io page: https://npm.io/package/jiuto_axios

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.21.1

## Recent versions

- 1.0.3 (latest) — 2021-02-14
- 1.0.2 — 2021-02-02
- 1.0.1 — 2021-02-02
- 1.0.0 — 2021-02-02

## README

## jiuto_axios

默认导出一个封装好的axios

默认配置：

axios.defaults.timeout = 10000;

axios.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";

### API

#### baseGet

baseGet(url, config = {}) 封装的get请求，接受url和额外的request配置

#### basePost

basePost(url, data, config = {}) 封装的post请求，接受url、data和额外的request配置

#### basePut

basePut(url, data, config = {}) 封装的put请求，接受url、data和额外的request配置

#### baseDelete(url, config = {})

baseDelete(url, config = {}) 封装的delete请求，接受url、data和额外的request配置

#### base

base(config) 请求基础配置，接受一个config，可用于拓展其他基础请求

示例：
```javaScript
basePut = (url, data, config = {}) => {
    config.method = "put";
    config.url = url;
    config.data = data;
    return base(config);
};
```

### 使用

`npm i jiuto_axios`

`import { baseGet, basePost, basePut, baseDelete } from "jiuto_axios";`

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