# superagent-seeall

> log detailed request and response (url, params, headers, body) for all superagent calls with a one-line change in your code

Latest version **0.9.5** (published 2018-03-21) · MIT license · 0 weekly downloads

## Install

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

## 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.9.5 |
| Published | 2018-03-21 |
| First published | 2018-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Felix Jost |
| Maintainers | felixdjost |

## Links

- npm: https://www.npmjs.com/package/superagent-seeall
- Repository: https://github.com/felixdjost/superagent-seeall
- Homepage: https://github.com/felixdjost/superagent-seeall#readme
- Issues: https://github.com/felixdjost/superagent-seeall/issues
- npm.io page: https://npm.io/package/superagent-seeall

## Dependencies (1)

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

## Recent versions

- 0.9.5 (latest) — 2018-03-21
- 0.9.3 — 2018-03-15
- 0.9.2 — 2018-03-15
- 0.9.1 — 2018-03-15

## README

# superagent-seeall
logs request and response details (http headers and body) of your superagent calls (with a one-line monkey patching)

## installation

```
npm install superagent-seeall
```

## usage

see index.js - simply wrap superagent by using
```js
const request = require('superagent-seeall')(require('superagent'))
```
and use superagent without any modifications as usual:
```
function logDemo () {
  request.put('https://postman-echo.com/put?foo1=bar1&foo2=bar2').send('this is the body').end((err, res) => {
    if (err) throw err
    console.log('done')
  })
}
```

the output is as follows
```
==================== superagent log ======================
:::::: superagent request :::: 
{
  "method": "PUT",
  "url": "https://postman-echo.com/put?foo1=bar1&foo2=bar2",
  "data": "this is the body",
  "headers": {
    "user-agent": "node-superagent/3.8.2",
    "content-type": "application/x-www-form-urlencoded"
  }
}
:::::: superagent response :::: 200
{
  "args": {
    "foo1": "bar1",
    "foo2": "bar2"
  },
  "data": "",
  "files": {},
  "form": {
    "this is the body": ""
  },
  "headers": {
    "host": "postman-echo.com",
    "content-length": "16",
    "accept-encoding": "gzip, deflate",
    "content-type": "application/x-www-form-urlencoded",
    "user-agent": "node-superagent/3.8.2",
    "x-forwarded-port": "443",
    "x-forwarded-proto": "https"
  },
  "json": {
    "this is the body": ""
  },
  "url": "https://postman-echo.com/put?foo1=bar1&foo2=bar2"
}
done
```

## License

MIT

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