Skip to content

Commit

Permalink
docs: clarify URI parsing behavior of ProxyAgent constructor (#2893)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossilor95 authored Mar 5, 2024
1 parent 2e174c5 commit 57947e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/docs/api/ProxyAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Returns: `ProxyAgent`
Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)

* **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.
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).
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.
* **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` (optional) - Default: `(origin, opts) => new Pool(origin, opts)`
Expand Down

0 comments on commit 57947e9

Please sign in to comment.