# popsicle-redirects

> Popsicle middleware for following HTTP redirects

Latest version **1.1.1** (published 2022-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install popsicle-redirects
pnpm add popsicle-redirects
yarn add popsicle-redirects
bun add popsicle-redirects
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-03-09 |
| First published | 2019-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Blake Embrey |
| Maintainers | blakeembrey |
| Keywords | popsicle, redirect, 301, 302, http |

## Links

- npm: https://www.npmjs.com/package/popsicle-redirects
- Repository: https://github.com/serviejs/popsicle-redirects
- Issues: https://github.com/serviejs/popsicle-redirects/issues
- npm.io page: https://npm.io/package/popsicle-redirects

## Recent versions

- 1.1.1 (latest) — 2022-03-09
- 1.1.0 — 2019-06-13
- 1.0.1 — 2019-06-11
- 1.0.0 — 2019-06-11

## README

# Popsicle Redirects

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][build-image]][build-url]
[![Build coverage][coverage-image]][coverage-url]

> Popsicle middleware for following HTTP redirects.

## Installation

```
npm install popsicle-redirects --save
```

## Usage

```js
import { redirects } from "popsicle-redirects";

const middleware = redirects(transport());
```

### Options

- `fn` Wrap a [`throwback`](https://github.com/serviejs/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](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.

## License

MIT

[npm-image]: https://img.shields.io/npm/v/popsicle-redirects
[npm-url]: https://npmjs.org/package/popsicle-redirects
[downloads-image]: https://img.shields.io/npm/dm/popsicle-redirects
[downloads-url]: https://npmjs.org/package/popsicle-redirects
[build-image]: https://img.shields.io/github/workflow/status/serviejs/popsicle-redirects/CI/main
[build-url]: https://github.com/serviejs/popsicle-redirects/actions/workflows/ci.yml?query=branch%3Amain
[coverage-image]: https://img.shields.io/codecov/c/gh/serviejs/popsicle-redirects
[coverage-url]: https://codecov.io/gh/serviejs/popsicle-redirects

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