From 57947e9432a0c1f2011db6950bdc0e3ae0aa5d13 Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi <65499789+rossilor95@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:55:59 +0100 Subject: [PATCH] docs: clarify URI parsing behavior of ProxyAgent constructor (#2893) --- docs/docs/api/ProxyAgent.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/api/ProxyAgent.md b/docs/docs/api/ProxyAgent.md index eaa6329f473..17f3f4b6798 100644 --- a/docs/docs/api/ProxyAgent.md +++ b/docs/docs/api/ProxyAgent.md @@ -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)`