Skip to content

Popsicle middleware for rejecting responses with bad HTTP statuses

License

Notifications You must be signed in to change notification settings

serviejs/popsicle-status

Repository files navigation

Popsicle Status

NPM version NPM downloads Build status Test coverage

Popsicle middleware for rejecting responses with bad HTTP statuses.

Installation

npm install popsicle-status --save

Usage

import { status } from "popsicle-status";

const middleware = status();

const res = await middleware(req, send);

status(min?: number, max?: number)

Default status codes of min 200 (inclusive) and max 400 (exclusive).

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT

About

Popsicle middleware for rejecting responses with bad HTTP statuses

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published