Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
325 bytes
|
Line | |
---|
1 | var needle = require('./..');
|
---|
2 |
|
---|
3 | var opts = {
|
---|
4 | username: 'user3',
|
---|
5 | password: 'user3',
|
---|
6 | auth: 'digest'
|
---|
7 | }
|
---|
8 |
|
---|
9 | needle.get('http://test.webdav.org/auth-digest/', opts, function(err, resp, body) {
|
---|
10 | console.log(resp.headers);
|
---|
11 |
|
---|
12 | if (resp.statusCode == 401)
|
---|
13 | console.log('\nIt failed.')
|
---|
14 | else
|
---|
15 | console.log('\nIt worked!')
|
---|
16 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.