Skip to content

Commit 1bbcfa2

Browse files
authored
Improve ProxyAgent example with autentication (#2004)
* Improve ProxyAgent example with autentification * return previous example as comment
1 parent 06c6488 commit 1bbcfa2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/api/ProxyAgent.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ import { setGlobalDispatcher, request, ProxyAgent } from 'undici';
8383

8484
const proxyAgent = new ProxyAgent({
8585
uri: 'my.proxy.server',
86-
token: 'Bearer xxxx'
86+
// token: 'Bearer xxxx'
87+
token: `Basic ${Buffer.from('username:password').toString('base64')}`
8788
});
8889
setGlobalDispatcher(proxyAgent);
8990

0 commit comments

Comments
 (0)