node-http-digest-client icon indicating copy to clipboard operation
node-http-digest-client copied to clipboard

problems using the example

Open ekelvin opened this issue 10 years ago • 2 comments

var digest = require('http-digest-client').createDigestClient('username', 'password'); throws an error.

  1. you should change it in: var digest = require('http-digest-client')('username', 'password');
  2. 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.

ekelvin avatar Mar 11 '14 14:03 ekelvin

var digest = require('http-digest-client')('username', 'password');

dayuoba avatar Jan 07 '15 07:01 dayuoba

Looks fixed in https://github.com/simme/node-http-digest-client/commit/1819fd34fb5d032be16c7257af1fefa69f2e15bf

addshore avatar May 09 '16 18:05 addshore