Need private packages and team management tools?Check out npm Teams »

popsicle-redirects

1.1.0 • Public • Published

Popsicle Redirects

NPM version NPM downloads Build status Test coverage

Popsicle middleware for following HTTP redirects.

Installation

npm install popsicle-redirects --save

Usage

import { redirects } from "popsicle-redirects";
 
const middleware = redirects(transport());

Options

  • fn Wrap a throwback compatible middleware function in redirect behavior
  • maxRedirects Set the maximum number of redirects to attempt before throwing an error (default: 5)
  • confirmRedirect Confirmation function for following 307 and 308 non-idempotent redirects (default: () => false)

TypeScript

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

License

MIT

Install

npm i popsicle-redirects

DownloadsWeekly Downloads

17,998

Version

1.1.0

License

MIT

Unpacked Size

17.4 kB

Total Files

9

Last publish

Collaborators

  • avatar