Skip to content

Commit 57947e9

Browse files
authored
docs: clarify URI parsing behavior of ProxyAgent constructor (#2893)
1 parent 2e174c5 commit 57947e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/docs/api/ProxyAgent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Returns: `ProxyAgent`
1717
Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)
1818

1919
* **uri** `string | URL` (required) - The URI of the proxy server. This can be provided as a string, as an instance of the URL class, or as an object with a `uri` property of type string.
20+
If the `uri` is provided as a string or `uri` is an object with an `uri` property of type string, then it will be parsed into a `URL` object according to the [WHATWG URL Specification](https://url.spec.whatwg.org).
21+
For detailed information on the parsing process and potential validation errors, please refer to the ["Writing" section](https://url.spec.whatwg.org/#writing) of the WHATWG URL Specification.
2022
* **token** `string` (optional) - It can be passed by a string of token for authentication.
2123
* **auth** `string` (**deprecated**) - Use token.
2224
* **clientFactory** `(origin: URL, opts: Object) => Dispatcher` (optional) - Default: `(origin, opts) => new Pool(origin, opts)`

0 commit comments

Comments
 (0)