# theon-superagent-adapter

> super-agent HTTP agent adapter for theon

Latest version **0.1.0** (published 2016-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install theon-superagent-adapter
pnpm add theon-superagent-adapter
yarn add theon-superagent-adapter
bun add theon-superagent-adapter
```

## 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-02-03 |
| First published | 2016-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Tomas Aparicio |
| Maintainers | h2non |
| Keywords | theon, superagent, super-agent, agent, adapter, request, tdd, bdd, http, test, testing |

## Links

- npm: https://www.npmjs.com/package/theon-superagent-adapter
- Repository: https://github.com/theonjs/expect
- Homepage: https://github.com/theonjs/expect#readme
- Issues: https://github.com/theonjs/expect/issues
- npm.io page: https://npm.io/package/theon-superagent-adapter

## Dependencies (1)

- [superagent](https://npm.io/package/superagent.md) ^1.7.2

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-02-03

## README

# superagent-adapter [![Build Status](https://travis-ci.org/theonjs/superagent-adapter.svg?branch=master)](https://travis-ci.org/theonjs/superagent-adapter) [![npm version](https://badge.fury.io/js/theon-superagent-adapter.svg)](https://www.npmjs.com/package/theon-superagent-adapter)

super-agent HTTP agent adapter [theon](http://github.com/h2non/theon).

## Installation

```bash
npm install theon-superagent-adapter --save
```

## Usage

```js
const theon = require('theon')
const superagent = require('theon-superagent-adapter')

// Define your default HTTP agent
theon.agents.set(superagent)

// Declare your API
const api = theon('http://api.server.com')
  .collection('/users')
  .set('Version', '1.0')
  .resource('getById')
  .path('/:id')
  .render()

// Consume your API
api.users
  .getById()
  .param('id', '1234')
  .expect(200)
  .expect('Content-Type', /json/i)
  .expect({ id: 1234, username: 'foo' })
  .end((err, res) => {
    if (err) {
      return console.error('Expect error:', err)
    }
  })
```

## License

MIT

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