# node-pinger

> Reads data exposed by any webserver

Latest version **0.0.6** (published 2017-02-08) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install node-pinger
pnpm add node-pinger
yarn add node-pinger
bun add node-pinger
```

## 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.0.6 |
| Published | 2017-02-08 |
| First published | 2017-02-03 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Shahzaib Salim |
| Maintainers | szeb06 |

## Links

- npm: https://www.npmjs.com/package/node-pinger
- npm.io page: https://npm.io/package/node-pinger

## Dependencies (1)

- [request](https://npm.io/package/request.md) 2.79.0

## Recent versions

- 0.0.6 (latest) — 2017-02-08
- 0.0.5 — 2017-02-07
- 0.0.4 — 2017-02-06
- 0.0.3 — 2017-02-06
- 0.0.2 — 2017-02-06
- 0.0.1 — 2017-02-03
- 0.0.0 — 2017-02-03

## README

## USAGE

`var nodePinger = require('node-pinger');`

### Declare variables

##### Headers _(if any)_

```
var headers = {
    'Content-Type': 'application/json',
	'Custom': 'Header'
}
```

##### URL
`var url = 'https://example.com/endpoint'`

##### Ping interval _(milliseconds)_

`var interval = 3000`

```
np = new nodePinger(url, headers, interval, function (err, res) {
    if (err) {
        console.log(err.message)
        console.log(err.data)
    } else if (res) {
        console.log(res)
    }
})
```

`np.getResponse()` to get the most recent response.

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