# hs-request

> axios封装请求模块

Latest version **1.0.5** (published 2021-06-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install hs-request
pnpm add hs-request
yarn add hs-request
bun add hs-request
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-06-18 |
| First published | 2021-06-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | dongyu |
| Maintainers | zhengdan |

## Links

- npm: https://www.npmjs.com/package/hs-request
- npm.io page: https://npm.io/package/hs-request

## Dependencies (4)

- [qs](https://npm.io/package/qs.md) ^6.10.1
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [js-cookie](https://npm.io/package/js-cookie.md) ^2.2.1

## Recent versions

- 1.0.5 (latest) — 2021-06-18
- 1.0.4 — 2021-06-18
- 1.0.3 — 2021-06-17
- 1.0.2 — 2021-06-17
- 1.0.1 — 2021-06-17
- 1.0.0 — 2021-06-17

## README

# hs-modules-request
axios封装请求模块

# usage
```javascript
// request.js
import http from 'hs-request'
const myRequest = new http({
	options,requestFn,responseFn
})
myRequest.init()
export myRequest

// xx.vue

import myRequest from './request'
myRequest.post(url,data).then(res=> {})
myRequest.get(url,data).then(res=> {})
myRequest.put(url,data).then(res=> {})
myRequest.delete(url,data).then(res=> {})
```

# options
baseURL: 请求地址 
headers: 请求头

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