A lightweight library for HTTP Digest Authentication, compatible with both the Fetch API and node-fetch. Version 0.7.0 (stable, with regular releases) provides both ESM and CJS bundles, as well as TypeScript declarations. Forked from digest-fetch to add multi-format module support and improved TypeScript integration. Ideal for Node.js environments that need to authenticate against HTTP Digest servers with minimal overhead, offering a simple client that wraps fetch calls.
npm install with-digest-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a DigestClient with credentials and fetches a protected URL, printing the response.
Ensure node-fetch is installed and imported if using Node <18.
Use import syntax or set esModuleInterop: true in tsconfig.json and use require('with-digest-fetch').default.Do not include 'Authorization' header; the client manages it.
Use a different library for non-Digest/Basic auth.
Explicitly set qop: 'auth' or omit to use default.
Install node-fetch: npm install node-fetch and import it: import fetch from 'node-fetch';
Use import DigestClient from 'with-digest-fetch' or const DigestClient = require('with-digest-fetch').default;Run npm install with-digest-fetch and ensure tsconfig.json has 'moduleResolution': 'node' or 'node16'.
Verify credentials and check if server requires Digest or Basic auth. Ensure algorithm matches (e.g., MD5, SHA-256).