You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
656
656
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.
The `redirect` interceptor allows you to customize the way your dispatcher handles redirects.
938
938
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).
940
940
941
941
**Example - Basic Redirect Interceptor**
942
942
@@ -954,7 +954,7 @@ client.request({ path: "/" })
954
954
955
955
The `retry` interceptor allows you to customize the way your dispatcher handles retries.
956
956
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).
958
958
959
959
**Example - Basic Redirect Interceptor**
960
960
@@ -1260,7 +1260,7 @@ The `cache` interceptor implements client-side response caching as described in
1260
1260
1261
1261
**Options**
1262
1262
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).
1264
1264
- `methods` - The [**safe** HTTP methods](https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1) to cache the response of.
1265
1265
1266
1266
## Instance Events
@@ -1309,13 +1309,13 @@ Emitted when dispatcher is no longer busy.
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:
1313
1313
* As an object specified by the `Record<string, string | string[] |undefined>` (`IncomingHttpHeaders`) type.
1314
1314
* As an array of strings. An array representation of a header list must have an even length, or an `InvalidArgumentError` will be thrown.
1315
1315
* As an iterable that can encompass `Headers`, `Map`, or a custom iterator returning key-value pairs.
1316
1316
Keys are lowercase and values are not modified.
1317
1317
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.
0 commit comments