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').createDigestClient('username', 'password');
throws an error.
var digest = require('http-digest-client')('username', 'password');
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.