You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
325 B
17 lines
325 B
4 years ago
|
var needle = require('./..');
|
||
|
|
||
|
var opts = {
|
||
|
username: 'user3',
|
||
|
password: 'user3',
|
||
|
auth: 'digest'
|
||
|
}
|
||
|
|
||
|
needle.get('http://test.webdav.org/auth-digest/', opts, function(err, resp, body) {
|
||
|
console.log(resp.headers);
|
||
|
|
||
|
if (resp.statusCode == 401)
|
||
|
console.log('\nIt failed.')
|
||
|
else
|
||
|
console.log('\nIt worked!')
|
||
|
});
|