From 44f60341981399f47d318c807704295cbe5164df Mon Sep 17 00:00:00 2001 From: Ezekiel Keator Date: Fri, 1 Mar 2024 13:04:17 -0600 Subject: [PATCH 1/5] Fix docs links --- docs/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/README.md b/docs/README.md index 84655d48cb0..d1872373e59 100644 --- a/docs/README.md +++ b/docs/README.md @@ -94,14 +94,14 @@ For more information about their behavior, please reference the body mixin from ## Common API Methods -This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [documentation](./documentation/) folder and are accessible via the navigation list on the left side of the docs site. +This section documents our most commonly used API methods. Additional APIs are documented in their own files within the API folder and are accessible via the navigation list on the left side of the docs site. ### `undici.request([url, options]): Promise` Arguments: * **url** `string | URL | UrlObject` -* **options** [`RequestOptions`](./documentation/docs/api/Dispatcher.md#parameter-requestoptions) +* **options** [`RequestOptions`](docs/api/Dispatcher.md#parameter-requestoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -110,14 +110,14 @@ Returns a promise with the result of the `Dispatcher.request` method. Calls `options.dispatcher.request(options)`. -See [Dispatcher.request](./documentation/docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details, and [request examples](./documentation/examples/README.md) for examples. +See [Dispatcher.request](docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details, and [request examples](./examples/README.md) for examples. ### `undici.stream([url, options, ]factory): Promise` Arguments: * **url** `string | URL | UrlObject` -* **options** [`StreamOptions`](./documentation/docs/api/Dispatcher.md#parameter-streamoptions) +* **options** [`StreamOptions`](docs/api/Dispatcher.md#parameter-streamoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -127,14 +127,14 @@ Returns a promise with the result of the `Dispatcher.stream` method. Calls `options.dispatcher.stream(options, factory)`. -See [Dispatcher.stream](documentation/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details. +See [Dispatcher.stream](docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details. ### `undici.pipeline([url, options, ]handler): Duplex` Arguments: * **url** `string | URL | UrlObject` -* **options** [`PipelineOptions`](documentation/docs/api/Dispatcher.md#parameter-pipelineoptions) +* **options** [`PipelineOptions`](docs/api/Dispatcher.md#parameter-pipelineoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -144,7 +144,7 @@ Returns: `stream.Duplex` Calls `options.dispatch.pipeline(options, handler)`. -See [Dispatcher.pipeline](documentation/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details. +See [Dispatcher.pipeline](docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details. ### `undici.connect([url, options]): Promise` @@ -153,7 +153,7 @@ Starts two-way communications with the requested resource using [HTTP CONNECT](h Arguments: * **url** `string | URL | UrlObject` -* **options** [`ConnectOptions`](documentation/docs/api/Dispatcher.md#parameter-connectoptions) +* **options** [`ConnectOptions`](docs/api/Dispatcher.md#parameter-connectoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(err: Error | null, data: ConnectData | null) => void` (optional) @@ -162,7 +162,7 @@ Returns a promise with the result of the `Dispatcher.connect` method. Calls `options.dispatch.connect(options)`. -See [Dispatcher.connect](documentation/docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details. +See [Dispatcher.connect](docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details. ### `undici.fetch(input[, init]): Promise` @@ -301,7 +301,7 @@ Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](h Arguments: * **url** `string | URL | UrlObject` -* **options** [`UpgradeOptions`](documentation/docs/api/Dispatcher.md#parameter-upgradeoptions) +* **options** [`UpgradeOptions`](docs/api/Dispatcher.md#parameter-upgradeoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(error: Error | null, data: UpgradeData) => void` (optional) @@ -310,7 +310,7 @@ Returns a promise with the result of the `Dispatcher.upgrade` method. Calls `options.dispatcher.upgrade(options)`. -See [Dispatcher.upgrade](documentation/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details. +See [Dispatcher.upgrade](docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details. ### `undici.setGlobalDispatcher(dispatcher)` From 3b0ca0ed90be3f4d1eaecf18352d65a18cd434ca Mon Sep 17 00:00:00 2001 From: Ezekiel Keator Date: Fri, 1 Mar 2024 13:04:42 -0600 Subject: [PATCH 2/5] Add examples to sidebar --- docs/docsify/sidebar.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docsify/sidebar.md b/docs/docsify/sidebar.md index 674c0dad0e7..00a21ef7a1f 100644 --- a/docs/docsify/sidebar.md +++ b/docs/docsify/sidebar.md @@ -1,6 +1,7 @@ * [**Home**](/ "Node.js Undici") +* [Examples](/examples/ "Undici Examples") * API * [Dispatcher](/docs/api/Dispatcher.md "Undici API - Dispatcher") * [Client](/docs/api/Client.md "Undici API - Client") From 8d5786f877f26cf8698f433c615ea391cdaa0c11 Mon Sep 17 00:00:00 2001 From: Ezekiel Keator <20361796+tastypackets@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:44:53 -0600 Subject: [PATCH 3/5] Correct docs link from main readme --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index d1872373e59..9e503c41b96 100644 --- a/docs/README.md +++ b/docs/README.md @@ -94,7 +94,7 @@ For more information about their behavior, please reference the body mixin from ## Common API Methods -This section documents our most commonly used API methods. Additional APIs are documented in their own files within the API folder and are accessible via the navigation list on the left side of the docs site. +This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs) folder and are accessible via the navigation list on the left side of the docs site. ### `undici.request([url, options]): Promise` From 30a30ee9044eb9e03638be68bc7707d6f3905590 Mon Sep 17 00:00:00 2001 From: Ezekiel Keator Date: Fri, 1 Mar 2024 19:54:30 -0600 Subject: [PATCH 4/5] Switch to relative paths in docs readme --- docs/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/README.md b/docs/README.md index 9e503c41b96..56f8d1a2667 100644 --- a/docs/README.md +++ b/docs/README.md @@ -94,14 +94,14 @@ For more information about their behavior, please reference the body mixin from ## Common API Methods -This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs) folder and are accessible via the navigation list on the left side of the docs site. +This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs/) folder and are accessible via the navigation list on the left side of the docs site. ### `undici.request([url, options]): Promise` Arguments: * **url** `string | URL | UrlObject` -* **options** [`RequestOptions`](docs/api/Dispatcher.md#parameter-requestoptions) +* **options** [`RequestOptions`](./docs/api/Dispatcher.md#parameter-requestoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -110,14 +110,14 @@ Returns a promise with the result of the `Dispatcher.request` method. Calls `options.dispatcher.request(options)`. -See [Dispatcher.request](docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details, and [request examples](./examples/README.md) for examples. +See [Dispatcher.request](./docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details, and [request examples](./examples/README.md) for examples. ### `undici.stream([url, options, ]factory): Promise` Arguments: * **url** `string | URL | UrlObject` -* **options** [`StreamOptions`](docs/api/Dispatcher.md#parameter-streamoptions) +* **options** [`StreamOptions`](./docs/api/Dispatcher.md#parameter-streamoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -127,14 +127,14 @@ Returns a promise with the result of the `Dispatcher.stream` method. Calls `options.dispatcher.stream(options, factory)`. -See [Dispatcher.stream](docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details. +See [Dispatcher.stream](./docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details. ### `undici.pipeline([url, options, ]handler): Duplex` Arguments: * **url** `string | URL | UrlObject` -* **options** [`PipelineOptions`](docs/api/Dispatcher.md#parameter-pipelineoptions) +* **options** [`PipelineOptions`](./docs/api/Dispatcher.md#parameter-pipelineoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET` * **maxRedirections** `Integer` - Default: `0` @@ -144,7 +144,7 @@ Returns: `stream.Duplex` Calls `options.dispatch.pipeline(options, handler)`. -See [Dispatcher.pipeline](docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details. +See [Dispatcher.pipeline](./docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details. ### `undici.connect([url, options]): Promise` @@ -153,7 +153,7 @@ Starts two-way communications with the requested resource using [HTTP CONNECT](h Arguments: * **url** `string | URL | UrlObject` -* **options** [`ConnectOptions`](docs/api/Dispatcher.md#parameter-connectoptions) +* **options** [`ConnectOptions`](./docs/api/Dispatcher.md#parameter-connectoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(err: Error | null, data: ConnectData | null) => void` (optional) @@ -162,7 +162,7 @@ Returns a promise with the result of the `Dispatcher.connect` method. Calls `options.dispatch.connect(options)`. -See [Dispatcher.connect](docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details. +See [Dispatcher.connect](./docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details. ### `undici.fetch(input[, init]): Promise` @@ -301,7 +301,7 @@ Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](h Arguments: * **url** `string | URL | UrlObject` -* **options** [`UpgradeOptions`](docs/api/Dispatcher.md#parameter-upgradeoptions) +* **options** [`UpgradeOptions`](./docs/api/Dispatcher.md#parameter-upgradeoptions) * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher) * **maxRedirections** `Integer` - Default: `0` * **callback** `(error: Error | null, data: UpgradeData) => void` (optional) @@ -310,7 +310,7 @@ Returns a promise with the result of the `Dispatcher.upgrade` method. Calls `options.dispatcher.upgrade(options)`. -See [Dispatcher.upgrade](docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details. +See [Dispatcher.upgrade](./docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details. ### `undici.setGlobalDispatcher(dispatcher)` From dfd5e23fd2d0062c60a9610bbbbe0e2b220f890f Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Tue, 5 Mar 2024 18:27:36 +0100 Subject: [PATCH 5/5] move examples down --- docs/docsify/sidebar.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docsify/sidebar.md b/docs/docsify/sidebar.md index 00a21ef7a1f..ab5216f7570 100644 --- a/docs/docsify/sidebar.md +++ b/docs/docsify/sidebar.md @@ -1,7 +1,6 @@ * [**Home**](/ "Node.js Undici") -* [Examples](/examples/ "Undici Examples") * API * [Dispatcher](/docs/api/Dispatcher.md "Undici API - Dispatcher") * [Client](/docs/api/Client.md "Undici API - Client") @@ -28,6 +27,8 @@ * [Util](/docs/api/Util.md "Undici API - Util") * [RedirectHandler](/docs/api/RedirectHandler.md "Undici API - RedirectHandler") * [RetryHandler](/docs/api/RetryHandler.md "Undici API - RetryHandler") +* Examples + * [Undici Examples](/examples/ "Undici Examples") * Best Practices * [Proxy](/docs/best-practices/proxy.md "Connecting through a proxy") * [Client Certificate](/docs/best-practices/client-certificate.md "Connect using a client certificate")