# assert-successful-request

> Simple callback function to assert successful HTTP responses made with the request module

Latest version **1.0.2** (published 2016-12-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install assert-successful-request
pnpm add assert-successful-request
yarn add assert-successful-request
bun add assert-successful-request
```

## 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.2 |
| Published | 2016-12-23 |
| First published | 2016-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Leon "LionC" Strauss |
| Maintainers | lionc |
| Keywords | assert, http, request, successful, response, status, code |

## Links

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

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-12-23
- 1.0.1 — 2016-12-15
- 1.0.0 — 2016-12-15

## README

# assert-successful-request
Simple callback function to assert successful HTTP responses made with the
request module

## How to use

```js
const assertSuccessfulResponse = require('assert-successful-request')

request({ uri: 'https://google.com' }, assertSuccessfulResponse)
```

Simply pass the function as a callback to your `request`-call to assert that
the request was successful.

A request is considered successful if it it resulted in a non-error HTTP status
code.

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