node-http-digest-client
node-http-digest-client copied to clipboard
problems using the example
var digest = require('http-digest-client').createDigestClient('username', 'password'); throws an error.
- you should change it in: var digest = require('http-digest-client')('username', 'password');
- it throws an Error here: HTTPDigest.prototype._parseChallenge = function parseChallenge(digest) { var prefix = "Digest "; var challenge = digest.substr(digest.indexOf(prefix) + prefix.length); digest is undefined so you can't call indexOf
It throws the 2. error when you try to connect to an existing path route.
var digest = require('http-digest-client')('username', 'password');
Looks fixed in https://github.com/simme/node-http-digest-client/commit/1819fd34fb5d032be16c7257af1fefa69f2e15bf