# superagent-use

> Global plugin support for SuperAgent

Latest version **0.1.0** (published 2016-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install superagent-use
pnpm add superagent-use
yarn add superagent-use
bun add superagent-use
```

## 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.0 |
| Published | 2016-09-28 |
| First published | 2016-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36 |
| Author | Koen Punt |
| Maintainers | koenpunt |
| Keywords | superagent, use, global, plugins |

## Links

- npm: https://www.npmjs.com/package/superagent-use
- Repository: https://github.com/koenpunt/superagent-use
- Homepage: https://github.com/koenpunt/superagent-use.git
- Issues: https://github.com/koenpunt/superagent-use/issues
- npm.io page: https://npm.io/package/superagent-use

## Dependencies (2)

- [extend](https://npm.io/package/extend.md) ^3.0.0
- [methods](https://npm.io/package/methods.md) ~1.1.2

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-09-28
- 0.0.1 — 2016-02-25

## README

# superagent-use [![Build Status](https://travis-ci.org/koenpunt/superagent-use.svg?branch=master)](https://travis-ci.org/koenpunt/superagent-use)

Global plugin support for [SuperAgent](https://github.com/visionmedia/superagent/).

## Summary

Instead of manually calling `use()` for every request, `use()` is called automatically for every request.

## Example

```js
/* The superagent-use module returns a clone of the superagent provided with the new functionality. */
var agent = require('superagent-use')(require('superagent'));
/* A sample superagent plugin/middleware. */
var prefix = require('superagent-prefix');

agent.use(prefix('https://api.example.com'));

agent
  .post('/auth')
  .send({user: 'foo', pass: 'bar123'})
  .on('request', function(req) {
    console.log(req.url); // => https://api.example.com/auth
  })
  .end(function(err, res) {
    //
  });
```

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