From 1bbcfa22c0b3a53ba74a3fbcc55e76a18f42e81f Mon Sep 17 00:00:00 2001 From: Evgeniy Date: Mon, 13 Mar 2023 12:35:30 +0300 Subject: [PATCH] Improve ProxyAgent example with autentication (#2004) * Improve ProxyAgent example with autentification * return previous example as comment --- docs/api/ProxyAgent.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/ProxyAgent.md b/docs/api/ProxyAgent.md index 05d67a094cf..b18382f2628 100644 --- a/docs/api/ProxyAgent.md +++ b/docs/api/ProxyAgent.md @@ -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);