commit
This commit is contained in:
parent
13ec9babde
commit
68f4b60012
1429 changed files with 2481 additions and 272836 deletions
4
node_modules/undici/docs/api/ProxyAgent.md
generated
vendored
4
node_modules/undici/docs/api/ProxyAgent.md
generated
vendored
|
@ -19,6 +19,7 @@ Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)
|
|||
* **uri** `string` (required) - It can be passed either by a string or a object containing `uri` as string.
|
||||
* **token** `string` (optional) - It can be passed by a string of token for authentication.
|
||||
* **auth** `string` (**deprecated**) - Use token.
|
||||
* **clientFactory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -83,7 +84,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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue