Skip to content

Commit

Permalink
Improve ProxyAgent example with autentication (#2004)
Browse files Browse the repository at this point in the history
* Improve ProxyAgent example with autentification

* return previous example as comment
  • Loading branch information
egmen committed Mar 13, 2023
1 parent 06c6488 commit 1bbcfa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/api/ProxyAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ import { setGlobalDispatcher, request, ProxyAgent } from 'undici';

const proxyAgent = new ProxyAgent({
uri: 'my.proxy.server',
token: 'Bearer xxxx'
// token: 'Bearer xxxx'
token: `Basic ${Buffer.from('username:password').toString('base64')}`
});
setGlobalDispatcher(proxyAgent);

Expand Down

0 comments on commit 1bbcfa2

Please sign in to comment.