# request-factory

> Makes requests easier

Latest version **0.1.14** (published 2016-12-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2016-12-17 |
| First published | 2015-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dmitry Polovka |
| Maintainers | message |
| Keywords | fetch, API, JSON, REST, http, ajax |

## Links

- npm: https://www.npmjs.com/package/request-factory
- Repository: https://github.com/message/request-factory
- Issues: https://github.com/message/request-factory/issues
- npm.io page: https://npm.io/package/request-factory

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) 4.16.3
- [es6-promise](https://npm.io/package/es6-promise.md) 4.0.5
- [jquery-param](https://npm.io/package/jquery-param.md) 0.2.0
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) 1.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.14 (latest) — 2016-12-17
- 0.1.13 — 2016-10-05
- 0.1.12 — 2016-09-07
- 0.1.11 — 2015-10-14
- 0.1.10 — 2015-09-24
- 0.1.9 — 2015-09-22
- 0.1.8 — 2015-09-07
- 0.1.7 — 2015-09-07
- 0.1.6 — 2015-09-04
- 0.1.5 — 2015-09-03
- 0.1.4 — 2015-07-29
- 0.1.3 — 2015-07-29
- 0.1.2 — 2015-07-28
- 0.1.1 — 2015-07-28
- 0.1.0 — 2015-07-28

## README

# request-factory

```js
var request = require("request-factory");
request.get(APIConstants.ADMINISTRATORS_READ_ROUTE)
.success(function(response) {
	// handle succeess
})
.error(function(response) {
	// handle error
})
.fatal(function(){
	// handle fatals
});
```

## API
###request.get(url, opts)
###request.post(url, data, opts)
###request.put(url, data, opts)
###request.patch(url, data, opts)
###request.delete(url, opts)


Every method returns chainable object which contains following methods:

`success` - 200-399 requests

`error` - 400+ requests

`fatal` - exception errors

`call` - Launches request if there is no `success`, `error`, `fatal` callbacks

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