# corie-request

> A custom request

Latest version **1.0.8** (published 2019-04-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-04-19 |
| First published | 2019-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jesse Feng |
| Maintainers | fengxinming |
| Keywords | corie, corie-request, request |

## Links

- npm: https://www.npmjs.com/package/corie-request
- Repository: https://github.com/fengxinming/corie-request
- Homepage: https://github.com/fengxinming/corie-request#readme
- Issues: https://github.com/fengxinming/corie-request/issues
- npm.io page: https://npm.io/package/corie-request

## Dependencies (4)

- [celia](https://npm.io/package/celia.md) ^5.0.1
- [clrsole](https://npm.io/package/clrsole.md) ^1.0.0-beta.1
- [request](https://npm.io/package/request.md) ^2.88.0
- [http-errors](https://npm.io/package/http-errors.md) ^1.7.1

## Recent versions

- 1.0.8 (latest) — 2019-04-19
- 1.0.7 — 2019-01-30
- 1.0.6 — 2019-01-29
- 1.0.5 — 2019-01-27
- 1.0.4 — 2019-01-27
- 1.0.3 — 2019-01-24
- 1.0.2 — 2019-01-13
- 1.0.1 — 2019-01-10
- 1.0.0 — 2019-01-07

## README

# corie-request

[![npm package](https://nodei.co/npm/corie-request.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/corie-request)

> Note: A promisify [request](https://github.com/request/request)

## Configuration

  - [request options](https://github.com/request/request#requestoptions-callback)
  - extra options
    - host - Array or String. sets the host portion of the URL.
    - interval - The time interval of retrying
    - logger - default: [corie-logger](https://www.npmjs.com/package/corie-logger). logger instance
    - logLevel - default: `ERROR`. apply to `corie-logger`
    - retries - default: `3` times. times of retrying
    - balance - default: `roundrobin`. ways of balance
    - protocol - default: `http:`. network protocol
    - validateBody - function. return `true` or `new Error()`
    - abortion - `new Abortion()`
    
## Usage
```javascript

const request = require('corie-request');
const { Abortion } = request;
const abortion = new Abortion();

request({
  abortion,
  ...options
});

abortion.abort();

```

## Jest

  - [test](https://github.com/fengxinming/corie-request/tree/master/test)

## Examples

  - [examples](https://github.com/fengxinming/corie-request/tree/master/examples)

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