# enhanced-fetch

> 增强的fetch封装

Latest version **0.0.0** (published 2019-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install enhanced-fetch
pnpm add enhanced-fetch
yarn add enhanced-fetch
bun add enhanced-fetch
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2019-02-27 |
| First published | 2019-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | TingGe |
| Maintainers | tingge |

## Links

- npm: https://www.npmjs.com/package/enhanced-fetch
- npm.io page: https://npm.io/package/enhanced-fetch

## Recent versions

- 0.0.0 (latest) — 2019-02-27
- 0.0.1 — 2019-02-20

## README

# enhanced-fetch

增强的fetch封装



## Usage

```bash
$ npm install -S enhanced-fetch
```



```javascript
import { createRequest, applyRequestMiddleware } from 'enhanced-fetch';

const middlewares = applyRequestMiddleware(
  // some middleware for api, such as debug, log, cache, tracker and so on.
);

const request = createRequest(middlewares);

request('http://xxx.com/api', {
  params: { aaa: 'aaa' },
  method: 'post',
  timeout: 5000,
}).then(response => {
  console.log('Got server response', response);
});
```

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