# http-digest-client

> Perform request agains digest authenticated servers.

Latest version **0.0.3** (published 2014-01-24) · 0 weekly downloads

## Install

```sh
npm install http-digest-client
pnpm add http-digest-client
yarn add http-digest-client
bun add http-digest-client
```

## 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.3 |
| Published | 2014-01-24 |
| First published | 2012-11-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Simon Ljungberg |
| Maintainers | simme |

## Links

- npm: https://www.npmjs.com/package/http-digest-client
- Repository: https://github.com/simme/node-http-digest-client
- Issues: https://github.com/simme/node-http-digest-client/issues
- npm.io page: https://npm.io/package/http-digest-client

## Recent versions

- 0.0.3 (latest) — 2014-01-24
- 0.0.2 — 2012-12-31
- 0.0.1 — 2012-11-22

## README

# HTTP Digest Client

Hacked together snippet for talking to HTTP servers that employ digest
authentication.

## Disclaimer

Only tested against one server and spec is not followed fully. It works for me
and for what I am doing.

## Usage

    var digest = require('http-digest-client').createDigestClient('username', 'password');
    digest.request({
      host: 'hostname.com',
      path: '/path.json',
      port: 80,
      method: 'GET',
      headers: { "User-Agent": "Simon Ljungberg" } // Set any headers you want
    }, function (res) {
      res.on('data', function (data) {
        console.log(data.toString());
      });
      res.on('error', function (err) {
        console.log('oh noes');
      });
    });

The digest client will make one reques to the server, authentication response
is calculated and then the request is made again. Hopefully you will then
be authorized.

## Writing to `req`

I haven't yet figured out a way to write data to the final `req` object.
Mainly because I haven't really needed it. Feel free to suggest solutions! :)

# License

See LICENSE.

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