Skip to content

Commit 2b88f3f

Browse files
committed
docs: fix broken links by using absolute path
1 parent d62731c commit 2b88f3f

16 files changed

+103
-100
lines changed

docs/docs/api/Agent.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -16,62 +16,62 @@ Returns: `Agent`
1616

1717
### Parameter: `AgentOptions`
1818

19-
Extends: [`PoolOptions`](Pool.md#parameter-pooloptions)
19+
Extends: [`PoolOptions`](/docs/docs/api/Pool.md#parameter-pooloptions)
2020

2121
* **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
2222

2323
## Instance Properties
2424

2525
### `Agent.closed`
2626

27-
Implements [Client.closed](Client.md#clientclosed)
27+
Implements [Client.closed](/docs/docs/api/Client.md#clientclosed)
2828

2929
### `Agent.destroyed`
3030

31-
Implements [Client.destroyed](Client.md#clientdestroyed)
31+
Implements [Client.destroyed](/docs/docs/api/Client.md#clientdestroyed)
3232

3333
## Instance Methods
3434

3535
### `Agent.close([callback])`
3636

37-
Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
37+
Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
3838

3939
### `Agent.destroy([error, callback])`
4040

41-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
41+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
4242

4343
### `Agent.dispatch(options, handler: AgentDispatchOptions)`
4444

45-
Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
45+
Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
4646

4747
#### Parameter: `AgentDispatchOptions`
4848

49-
Extends: [`DispatchOptions`](Dispatcher.md#parameter-dispatchoptions)
49+
Extends: [`DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions)
5050

5151
* **origin** `string | URL`
5252

53-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
53+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
5454

5555
### `Agent.connect(options[, callback])`
5656

57-
See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
57+
See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
5858

5959
### `Agent.dispatch(options, handler)`
6060

61-
Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
61+
Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
6262

6363
### `Agent.pipeline(options, handler)`
6464

65-
See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
65+
See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
6666

6767
### `Agent.request(options[, callback])`
6868

69-
See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
69+
See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
7070

7171
### `Agent.stream(options, factory[, callback])`
7272

73-
See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
73+
See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
7474

7575
### `Agent.upgrade(options[, callback])`
7676

77-
See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
77+
See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).

docs/docs/api/BalancedPool.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Arguments:
1515

1616
### Parameter: `BalancedPoolOptions`
1717

18-
Extends: [`PoolOptions`](Pool.md#parameter-pooloptions)
18+
Extends: [`PoolOptions`](/docs/docs/api/Pool.md#parameter-pooloptions)
1919

2020
* **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
2121

@@ -28,15 +28,15 @@ Returns an array of upstreams that were previously added.
2828

2929
### `BalancedPool.closed`
3030

31-
Implements [Client.closed](Client.md#clientclosed)
31+
Implements [Client.closed](/docs/docs/api/Client.md#clientclosed)
3232

3333
### `BalancedPool.destroyed`
3434

35-
Implements [Client.destroyed](Client.md#clientdestroyed)
35+
Implements [Client.destroyed](/docs/docs/api/Client.md#clientdestroyed)
3636

3737
### `Pool.stats`
3838

39-
Returns [`PoolStats`](PoolStats.md) instance for this pool.
39+
Returns [`PoolStats`](/docs/docs/api/PoolStats.md) instance for this pool.
4040

4141
## Instance Methods
4242

@@ -54,46 +54,46 @@ Removes an upstream that was previously added.
5454

5555
### `BalancedPool.close([callback])`
5656

57-
Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
57+
Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
5858

5959
### `BalancedPool.destroy([error, callback])`
6060

61-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
61+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
6262

6363
### `BalancedPool.connect(options[, callback])`
6464

65-
See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
65+
See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
6666

6767
### `BalancedPool.dispatch(options, handlers)`
6868

69-
Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
69+
Implements [`Dispatcher.dispatch(options, handlers)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
7070

7171
### `BalancedPool.pipeline(options, handler)`
7272

73-
See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
73+
See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
7474

7575
### `BalancedPool.request(options[, callback])`
7676

77-
See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
77+
See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
7878

7979
### `BalancedPool.stream(options, factory[, callback])`
8080

81-
See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
81+
See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
8282

8383
### `BalancedPool.upgrade(options[, callback])`
8484

85-
See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
85+
See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
8686

8787
## Instance Events
8888

8989
### Event: `'connect'`
9090

91-
See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect).
91+
See [Dispatcher Event: `'connect'`](/docs/docs/api/Dispatcher.md#event-connect).
9292

9393
### Event: `'disconnect'`
9494

95-
See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect).
95+
See [Dispatcher Event: `'disconnect'`](/docs/docs/api/Dispatcher.md#event-disconnect).
9696

9797
### Event: `'drain'`
9898

99-
See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain).
99+
See [Dispatcher Event: `'drain'`](/docs/docs/api/Dispatcher.md#event-drain).

docs/docs/api/CacheStore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ and defines extra properties relevant to the cache interceptor.
103103

104104
### Getter: `value`
105105

106-
The response's [`CacheStoreValue`](#cachestorevalue)
106+
The response's [`CacheStoreValue`](/docs/docs/api/CacheStore.md#cachestorevalue)
107107

108108
## `CacheStoreWriteable`
109109

docs/docs/api/Client.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -86,37 +86,37 @@ const client = new Client('https://localhost:3000', {
8686

8787
### `Client.close([callback])`
8888

89-
Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
89+
Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
9090

9191
### `Client.destroy([error, callback])`
9292

93-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
93+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
9494

9595
Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided).
9696

9797
### `Client.connect(options[, callback])`
9898

99-
See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
99+
See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
100100

101101
### `Client.dispatch(options, handlers)`
102102

103-
Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
103+
Implements [`Dispatcher.dispatch(options, handlers)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
104104

105105
### `Client.pipeline(options, handler)`
106106

107-
See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
107+
See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
108108

109109
### `Client.request(options[, callback])`
110110

111-
See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
111+
See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
112112

113113
### `Client.stream(options, factory[, callback])`
114114

115-
See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
115+
See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
116116

117117
### `Client.upgrade(options[, callback])`
118118

119-
See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
119+
See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
120120

121121
## Instance Properties
122122

@@ -142,7 +142,7 @@ Property to get and set the pipelining factor.
142142

143143
### Event: `'connect'`
144144

145-
See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect).
145+
See [Dispatcher Event: `'connect'`](/docs/docs/api/Dispatcher.md#event-connect).
146146

147147
Parameters:
148148

@@ -188,7 +188,7 @@ try {
188188

189189
### Event: `'disconnect'`
190190

191-
See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect).
191+
See [Dispatcher Event: `'disconnect'`](/docs/docs/api/Dispatcher.md#event-disconnect).
192192

193193
Parameters:
194194

@@ -233,7 +233,7 @@ try {
233233

234234
Emitted when pipeline is no longer busy.
235235

236-
See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain).
236+
See [Dispatcher Event: `'drain'`](/docs/docs/api/Dispatcher.md#event-drain).
237237

238238
#### Example - Client drain event
239239

docs/docs/api/Dispatcher.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ Returns: `stream.Duplex`
377377

378378
#### Parameter: PipelineOptions
379379

380-
Extends: [`RequestOptions`](#parameter-requestoptions)
380+
Extends: [`RequestOptions`](/docs/docs/api/Dispatch.md#parameter-requestoptions)
381381

382382
* **objectMode** `boolean` (optional) - Default: `false` - Set to `true` if the `handler` will return an object stream.
383383

@@ -467,7 +467,7 @@ Returns: `void | Promise<ResponseData>` - Only returns a `Promise` if no `callba
467467

468468
#### Parameter: `RequestOptions`
469469

470-
Extends: [`DispatchOptions`](#parameter-dispatchoptions)
470+
Extends: [`DispatchOptions`](/docs/docs/api/Dispatch.md#parameter-dispatchoptions)
471471

472472
* **opaque** `unknown` (optional) - Default: `null` - Used for passing through context to `ResponseData`.
473473
* **signal** `AbortSignal | events.EventEmitter | null` (optional) - Default: `null`.
@@ -654,7 +654,7 @@ return null
654654

655655
A faster version of `Dispatcher.request`. This method expects the second argument `factory` to return a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream which the response will be written to. This improves performance by avoiding creating an intermediate [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) stream when the user expects to directly pipe the response body to a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream.
656656

657-
As demonstrated in [Example 1 - Basic GET stream request](#example-1---basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](#example-2---stream-to-fastify-response) for more details.
657+
As demonstrated in [Example 1 - Basic GET stream request](/docs/docs/api/Dispatch.md#example-1---basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](/docs/docs/api/Dispatch.md#example-2---stream-to-fastify-response) for more details.
658658

659659
Arguments:
660660

@@ -936,7 +936,7 @@ await client.request({ path: '/', method: 'GET' })
936936

937937
The `redirect` interceptor allows you to customize the way your dispatcher handles redirects.
938938

939-
It accepts the same arguments as the [`RedirectHandler` constructor](./RedirectHandler.md).
939+
It accepts the same arguments as the [`RedirectHandler` constructor](/docs/docs/api/RedirectHandler.md).
940940

941941
**Example - Basic Redirect Interceptor**
942942

@@ -954,7 +954,7 @@ client.request({ path: "/" })
954954

955955
The `retry` interceptor allows you to customize the way your dispatcher handles retries.
956956

957-
It accepts the same arguments as the [`RetryHandler` constructor](./RetryHandler.md).
957+
It accepts the same arguments as the [`RetryHandler` constructor](/docs/docs/api/RetryHandler.md).
958958

959959
**Example - Basic Redirect Interceptor**
960960

@@ -1260,7 +1260,7 @@ The `cache` interceptor implements client-side response caching as described in
12601260
12611261
**Options**
12621262
1263-
- `store` - The [`CacheStore`](./CacheStore.md) to store and retrieve responses from. Default is [`MemoryCacheStore`](./CacheStore.md#memorycachestore).
1263+
- `store` - The [`CacheStore`](/docs/docs/api/CacheStore.md) to store and retrieve responses from. Default is [`MemoryCacheStore`](/docs/docs/api/CacheStore.md#memorycachestore).
12641264
- `methods` - The [**safe** HTTP methods](https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1) to cache the response of.
12651265
12661266
## Instance Events
@@ -1309,13 +1309,13 @@ Emitted when dispatcher is no longer busy.
13091309
13101310
* `Record<string, string | string[] | undefined> | string[] | Iterable<[string, string | string[] | undefined]> | null`
13111311
1312-
Header arguments such as `options.headers` in [`Client.dispatch`](Client.md#clientdispatchoptions-handlers) can be specified in three forms:
1312+
Header arguments such as `options.headers` in [`Client.dispatch`](/docs/docs/api/Client.md#clientdispatchoptions-handlers) can be specified in three forms:
13131313
* As an object specified by the `Record<string, string | string[] | undefined>` (`IncomingHttpHeaders`) type.
13141314
* As an array of strings. An array representation of a header list must have an even length, or an `InvalidArgumentError` will be thrown.
13151315
* As an iterable that can encompass `Headers`, `Map`, or a custom iterator returning key-value pairs.
13161316
Keys are lowercase and values are not modified.
13171317
1318-
Response headers will derive a `host` from the `url` of the [Client](Client.md#class-client) instance if no `host` header was previously specified.
1318+
Response headers will derive a `host` from the `url` of the [Client](/docs/docs/api/Client.md#class-client) instance if no `host` header was previously specified.
13191319
13201320
### Example 1 - Object
13211321

docs/docs/api/EnvHttpProxyAgent.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Returns: `EnvHttpProxyAgent`
2020

2121
### Parameter: `EnvHttpProxyAgentOptions`
2222

23-
Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)
23+
Extends: [`AgentOptions`](/docs/docs/api/Agent.md#parameter-agentoptions)
2424

2525
* **httpProxy** `string` (optional) - When set, it will override the `HTTP_PROXY` environment variable.
2626
* **httpsProxy** `string` (optional) - When set, it will override the `HTTPS_PROXY` environment variable.
@@ -118,44 +118,44 @@ const data = await json() // data { foo: "bar" }
118118

119119
### `EnvHttpProxyAgent.close([callback])`
120120

121-
Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
121+
Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
122122

123123
### `EnvHttpProxyAgent.destroy([error, callback])`
124124

125-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
125+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
126126

127127
### `EnvHttpProxyAgent.dispatch(options, handler: AgentDispatchOptions)`
128128

129-
Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
129+
Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
130130

131131
#### Parameter: `AgentDispatchOptions`
132132

133-
Extends: [`DispatchOptions`](Dispatcher.md#parameter-dispatchoptions)
133+
Extends: [`DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions)
134134

135135
* **origin** `string | URL`
136136

137-
Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
137+
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
138138

139139
### `EnvHttpProxyAgent.connect(options[, callback])`
140140

141-
See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
141+
See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
142142

143143
### `EnvHttpProxyAgent.dispatch(options, handler)`
144144

145-
Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
145+
Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
146146

147147
### `EnvHttpProxyAgent.pipeline(options, handler)`
148148

149-
See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
149+
See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
150150

151151
### `EnvHttpProxyAgent.request(options[, callback])`
152152

153-
See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
153+
See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
154154

155155
### `EnvHttpProxyAgent.stream(options, factory[, callback])`
156156

157-
See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
157+
See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
158158

159159
### `EnvHttpProxyAgent.upgrade(options[, callback])`
160160

161-
See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
161+
See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).

0 commit comments

Comments
 (0)