@depup/undici 8.0.2-depup.0 → 8.8.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +2 -2
  2. package/changes.json +1 -1
  3. package/docs/docs/api/Agent.md +249 -42
  4. package/docs/docs/api/BalancedPool.md +246 -48
  5. package/docs/docs/api/CacheStorage.md +171 -13
  6. package/docs/docs/api/CacheStore.md +294 -98
  7. package/docs/docs/api/Client.md +378 -147
  8. package/docs/docs/api/ClientStats.md +80 -14
  9. package/docs/docs/api/Connector.md +118 -35
  10. package/docs/docs/api/ContentType.md +65 -25
  11. package/docs/docs/api/Cookies.md +125 -47
  12. package/docs/docs/api/Debug.md +34 -18
  13. package/docs/docs/api/DiagnosticsChannel.md +364 -164
  14. package/docs/docs/api/Dispatcher.md +485 -1085
  15. package/docs/docs/api/EnvHttpProxyAgent.md +104 -93
  16. package/docs/docs/api/Errors.md +503 -28
  17. package/docs/docs/api/EventSource.md +322 -13
  18. package/docs/docs/api/Fetch.md +681 -30
  19. package/docs/docs/api/GlobalInstallation.md +78 -96
  20. package/docs/docs/api/H2CClient.md +298 -176
  21. package/docs/docs/api/Interceptors.md +414 -0
  22. package/docs/docs/api/MockAgent.md +333 -314
  23. package/docs/docs/api/MockCallHistory.md +272 -98
  24. package/docs/docs/api/MockCallHistoryLog.md +189 -26
  25. package/docs/docs/api/MockClient.md +151 -33
  26. package/docs/docs/api/MockErrors.md +56 -5
  27. package/docs/docs/api/MockPool.md +321 -258
  28. package/docs/docs/api/Pool.md +236 -41
  29. package/docs/docs/api/PoolStats.md +119 -13
  30. package/docs/docs/api/ProxyAgent.md +179 -160
  31. package/docs/docs/api/RedirectHandler.md +238 -60
  32. package/docs/docs/api/RetryAgent.md +113 -26
  33. package/docs/docs/api/RetryHandler.md +161 -77
  34. package/docs/docs/api/RoundRobinPool.md +166 -72
  35. package/docs/docs/api/SnapshotAgent.md +262 -517
  36. package/docs/docs/api/Socks5ProxyAgent.md +162 -186
  37. package/docs/docs/api/Util.md +68 -11
  38. package/docs/docs/api/WebSocket.md +475 -80
  39. package/docs/docs/api/api-lifecycle.md +100 -32
  40. package/docs/docs/best-practices/client-certificate.md +2 -0
  41. package/docs/docs/best-practices/crawling.md +3 -1
  42. package/docs/docs/best-practices/migrating-from-v7-to-v8.md +233 -0
  43. package/docs/docs/best-practices/mocking-request.md +9 -7
  44. package/docs/docs/best-practices/proxy.md +3 -1
  45. package/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
  46. package/docs/docs/best-practices/writing-tests.md +2 -0
  47. package/docs/docs/getting-started.md +281 -0
  48. package/docs/docs/index.md +784 -0
  49. package/docs/docs/site.json +125 -0
  50. package/docs/docs/type-map.json +79 -0
  51. package/index.js +2 -2
  52. package/lib/api/api-connect.js +1 -1
  53. package/lib/api/api-pipeline.js +6 -2
  54. package/lib/api/api-request.js +9 -3
  55. package/lib/api/api-stream.js +52 -6
  56. package/lib/api/api-upgrade.js +8 -2
  57. package/lib/api/readable.js +50 -4
  58. package/lib/cache/memory-cache-store.js +1 -1
  59. package/lib/cache/sqlite-cache-store.js +6 -4
  60. package/lib/core/connect.js +45 -4
  61. package/lib/core/constants.js +1 -24
  62. package/lib/core/errors.js +22 -2
  63. package/lib/core/request.js +19 -4
  64. package/lib/core/socks5-client.js +24 -9
  65. package/lib/core/socks5-utils.js +32 -23
  66. package/lib/core/symbols.js +1 -0
  67. package/lib/core/util.js +66 -15
  68. package/lib/dispatcher/agent.js +38 -40
  69. package/lib/dispatcher/balanced-pool.js +21 -26
  70. package/lib/dispatcher/client-h1.js +212 -38
  71. package/lib/dispatcher/client-h2.js +886 -308
  72. package/lib/dispatcher/client.js +42 -10
  73. package/lib/dispatcher/dispatcher-base.js +23 -0
  74. package/lib/dispatcher/dispatcher1-wrapper.js +6 -0
  75. package/lib/dispatcher/h2c-client.js +5 -5
  76. package/lib/dispatcher/pool-base.js +27 -9
  77. package/lib/dispatcher/pool.js +31 -6
  78. package/lib/dispatcher/proxy-agent.js +68 -14
  79. package/lib/dispatcher/round-robin-pool.js +31 -9
  80. package/lib/dispatcher/socks5-proxy-agent.js +99 -82
  81. package/lib/handler/cache-handler.js +94 -6
  82. package/lib/handler/cache-revalidation-handler.js +10 -0
  83. package/lib/handler/redirect-handler.js +46 -63
  84. package/lib/handler/retry-handler.js +77 -23
  85. package/lib/interceptor/cache.js +21 -4
  86. package/lib/interceptor/decompress.js +5 -2
  87. package/lib/interceptor/dns.js +5 -1
  88. package/lib/interceptor/redirect.js +3 -3
  89. package/lib/llhttp/llhttp-wasm.js +1 -1
  90. package/lib/llhttp/llhttp_simd-wasm.js +1 -1
  91. package/lib/mock/mock-agent.js +8 -8
  92. package/lib/mock/mock-call-history.js +15 -15
  93. package/lib/mock/mock-interceptor.js +25 -7
  94. package/lib/mock/mock-utils.js +42 -11
  95. package/lib/mock/snapshot-agent.js +11 -1
  96. package/lib/mock/snapshot-recorder.js +38 -3
  97. package/lib/util/cache.js +65 -16
  98. package/lib/util/runtime-features.js +3 -34
  99. package/lib/web/cache/cache.js +6 -8
  100. package/lib/web/cookies/parse.js +20 -27
  101. package/lib/web/cookies/util.js +1 -1
  102. package/lib/web/eventsource/eventsource-stream.js +245 -150
  103. package/lib/web/eventsource/eventsource.js +7 -18
  104. package/lib/web/eventsource/util.js +32 -1
  105. package/lib/web/fetch/body.js +48 -10
  106. package/lib/web/fetch/constants.js +1 -1
  107. package/lib/web/fetch/formdata-parser.js +17 -6
  108. package/lib/web/fetch/formdata.js +21 -2
  109. package/lib/web/fetch/index.js +85 -42
  110. package/lib/web/fetch/request.js +33 -3
  111. package/lib/web/fetch/response.js +1 -3
  112. package/lib/web/fetch/util.js +8 -3
  113. package/lib/web/webidl/index.js +7 -9
  114. package/lib/web/websocket/frame.js +1 -7
  115. package/lib/web/websocket/permessage-deflate.js +13 -31
  116. package/lib/web/websocket/receiver.js +80 -23
  117. package/lib/web/websocket/stream/websocketstream.js +19 -12
  118. package/lib/web/websocket/websocket.js +8 -1
  119. package/package.json +8 -8
  120. package/types/agent.d.ts +0 -2
  121. package/types/client.d.ts +33 -22
  122. package/types/connector.d.ts +1 -0
  123. package/types/cookies.d.ts +1 -1
  124. package/types/dispatcher.d.ts +7 -11
  125. package/types/errors.d.ts +10 -0
  126. package/types/fetch.d.ts +5 -1
  127. package/types/formdata.d.ts +0 -6
  128. package/types/h2c-client.d.ts +6 -6
  129. package/types/handlers.d.ts +2 -0
  130. package/types/header.d.ts +5 -0
  131. package/types/interceptors.d.ts +1 -1
  132. package/types/mock-interceptor.d.ts +5 -1
  133. package/types/pool.d.ts +0 -2
  134. package/types/proxy-agent.d.ts +9 -2
  135. package/types/round-robin-pool.d.ts +0 -2
  136. package/types/snapshot-agent.d.ts +4 -0
  137. package/types/socks5-proxy-agent.d.ts +2 -2
  138. package/types/webidl.d.ts +0 -1
  139. package/lib/llhttp/.gitkeep +0 -0
  140. package/lib/util/promise.js +0 -28
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/undici
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [undici](https://www.npmjs.com/package/undici) @ 8.0.2 |
17
- | Processed | 2026-04-04 |
16
+ | Original | [undici](https://www.npmjs.com/package/undici) @ 8.8.0 |
17
+ | Processed | 2026-07-21 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 0 |
20
20
 
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-04-04T12:15:52.479Z",
3
+ "timestamp": "2026-07-21T16:25:44.269Z",
4
4
  "totalUpdated": 0
5
5
  }
@@ -1,84 +1,291 @@
1
1
  # Agent
2
2
 
3
- Extends: `undici.Dispatcher`
3
+ <!--introduced_in=v3.2.0-->
4
+ <!--type=module-->
5
+ <!-- source_link=lib/dispatcher/agent.js -->
4
6
 
5
- Agent allows dispatching requests against multiple different origins.
7
+ > Stability: 2 - Stable
6
8
 
7
- Requests are not guaranteed to be dispatched in order of invocation.
9
+ An `Agent` dispatches requests against multiple different origins, creating and
10
+ reusing a per-origin [`Pool`][] (or [`Client`][]) on demand. It is the default
11
+ dispatcher used by [`request`][], [`stream`][], and [`fetch`][] when no explicit
12
+ dispatcher is supplied.
8
13
 
9
- ## `new undici.Agent([options])`
14
+ Requests are not guaranteed to be dispatched in their order of invocation.
10
15
 
11
- Arguments:
16
+ ```mjs
17
+ import { Agent, setGlobalDispatcher } from 'undici'
12
18
 
13
- * **options** `AgentOptions` (optional)
19
+ const agent = new Agent({ connections: 10 })
20
+ setGlobalDispatcher(agent)
21
+ ```
14
22
 
15
- Returns: `Agent`
23
+ ## Class: `Agent`
16
24
 
17
- ### Parameter: `AgentOptions`
25
+ <!-- YAML
26
+ added: v3.2.0
27
+ -->
18
28
 
19
- Extends: [`PoolOptions`](/docs/docs/api/Pool.md#parameter-pooloptions)
29
+ * Extends: {Dispatcher}
20
30
 
21
- * **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
22
- * **maxOrigins** `number` (optional) - Default: `Infinity` - Limits the total number of origins that can receive requests at a time, throwing an `MaxOriginsReachedError` error when attempting to dispatch when the max is reached. If `Infinity`, no limit is enforced.
31
+ `Agent` keeps an internal map of origins to dispatchers. The first request to a
32
+ given origin lazily creates a dispatcher through the configured `factory`, and
33
+ subsequent requests to the same origin reuse it. Idle dispatchers are closed
34
+ automatically once they have no open connections and are no longer busy.
23
35
 
24
- ## Instance Properties
36
+ ### `new Agent([options])`
25
37
 
26
- ### `Agent.closed`
38
+ <!-- YAML
39
+ added: v3.2.0
40
+ changes:
41
+ - version: v7.16.0
42
+ pr-url: https://github.com/nodejs/undici/pull/4365
43
+ description: Added the `maxOrigins` option to cap the number of origins.
44
+ -->
27
45
 
28
- Implements [Client.closed](/docs/docs/api/Client.md#clientclosed)
46
+ * `options` {AgentOptions} (optional) Extends {PoolOptions}.
47
+ * `factory` {Function} Builds the dispatcher used for a given origin. When the
48
+ resolved options contain `connections: 1`, the default factory creates a
49
+ {Client}; otherwise it creates a {Pool}. **Default:** `(origin, opts) => new Pool(origin, opts)`.
50
+ * `origin` {URL|string} The origin to create a dispatcher for.
51
+ * `opts` {Object} The resolved options for the new dispatcher.
52
+ * Returns: {Dispatcher}
53
+ * `maxOrigins` {number} Limits the total number of distinct origins that may
54
+ receive requests at the same time. A {MaxOriginsReachedError} is thrown when
55
+ a request targets a new origin once the limit is reached. When set to
56
+ `Infinity`, no limit is enforced. Must be a number greater than `0`.
57
+ **Default:** `Infinity`.
29
58
 
30
- ### `Agent.destroyed`
59
+ `Agent` inherits all {PoolOptions} (and therefore all {ClientOptions}). The
60
+ per-origin {Pool} it creates uses the default unlimited `connections`, so
61
+ concurrent requests to the same origin are spread across separate {Client}
62
+ instances on separate sockets.
31
63
 
32
- Implements [Client.destroyed](/docs/docs/api/Client.md#clientdestroyed)
64
+ > [!NOTE]
65
+ > Because each concurrent request to an origin may use a different {Client},
66
+ > HTTP/2 multiplexing on a shared session does not apply unless `connections` is
67
+ > set to a small value (for example `connections: 1`). See {PoolOptions} and
68
+ > {ClientOptions} for the full set of inherited options such as `allowH2`
69
+ > (default `true`) and `maxConcurrentStreams` (default `100`).
33
70
 
34
- ## Instance Methods
71
+ ### `agent.closed`
35
72
 
36
- ### `Agent.close([callback])`
73
+ <!-- YAML
74
+ added: v3.2.0
75
+ -->
37
76
 
38
- Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
77
+ * Type: {boolean}
39
78
 
40
- ### `Agent.destroy([error, callback])`
79
+ `true` after [`agent.close()`][] has been called.
41
80
 
42
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
81
+ ### `agent.destroyed`
43
82
 
44
- ### `Agent.dispatch(options, handler: AgentDispatchOptions)`
83
+ <!-- YAML
84
+ added: v3.2.0
85
+ -->
45
86
 
46
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
87
+ * Type: {boolean}
47
88
 
48
- #### Parameter: `AgentDispatchOptions`
89
+ `true` after [`agent.destroy()`][] has been called, or after [`agent.close()`][]
90
+ has been called and the shutdown has completed.
49
91
 
50
- Extends: [`DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions)
92
+ ### `agent.stats`
51
93
 
52
- * **origin** `string | URL`
94
+ <!-- YAML
95
+ added: v7.9.0
96
+ -->
53
97
 
54
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
98
+ * Type: {Record<string, ClientStats|PoolStats>}
55
99
 
56
- ### `Agent.connect(options[, callback])`
100
+ Aggregate statistics for the agent, keyed by origin. Each value is the
101
+ [`ClientStats`][] or [`PoolStats`][] object reported by the dispatcher currently
102
+ serving that origin. Origins whose dispatcher does not expose `stats` are
103
+ omitted.
57
104
 
58
- See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
105
+ ```mjs
106
+ import { Agent } from 'undici'
59
107
 
60
- ### `Agent.dispatch(options, handler)`
108
+ const agent = new Agent()
109
+ await agent.request({ origin: 'http://localhost:3000', path: '/', method: 'GET' })
110
+ console.log(agent.stats)
111
+ // { 'http://localhost:3000': PoolStats { ... } }
112
+ ```
61
113
 
62
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
114
+ ### `agent.dispatch(options, handler)`
63
115
 
64
- ### `Agent.pipeline(options, handler)`
116
+ <!-- YAML
117
+ added: v3.2.0
118
+ -->
65
119
 
66
- See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
120
+ * `options` {AgentDispatchOptions} Extends {DispatchOptions}.
121
+ * `origin` {string|URL} The origin to dispatch the request against. Required.
122
+ * `handler` {DispatchHandler}
123
+ * Returns: {boolean} `false` if the dispatcher is busy and the caller should
124
+ wait for the [`'drain'`][] event before dispatching again.
67
125
 
68
- ### `Agent.request(options[, callback])`
126
+ Routes the request to the dispatcher for `options.origin`, creating one through
127
+ the `factory` if needed. Throws an {InvalidArgumentError} when `options.origin`
128
+ is not a non-empty string or {URL}, and a {MaxOriginsReachedError} when a new
129
+ origin would exceed `maxOrigins`. Implements [`Dispatcher.dispatch()`][].
69
130
 
70
- See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
131
+ ### `agent.close([callback])`
71
132
 
72
- ### `Agent.stream(options, factory[, callback])`
133
+ <!-- YAML
134
+ added: v3.2.0
135
+ -->
73
136
 
74
- See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
137
+ * `callback` {Function} (optional) Invoked once every per-origin dispatcher has
138
+ closed. When omitted, a {Promise} is returned.
139
+ * Returns: {Promise|void}
75
140
 
76
- ### `Agent.upgrade(options[, callback])`
141
+ Gracefully closes the agent and every dispatcher it owns, waiting for in-flight
142
+ requests to complete. Implements [`Dispatcher.close()`][].
77
143
 
78
- See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
144
+ ### `agent.destroy([error[, callback]])`
79
145
 
80
- ### `Agent.stats()`
146
+ <!-- YAML
147
+ added: v3.2.0
148
+ -->
81
149
 
82
- Returns an object of stats by origin in the format of `Record<string, TClientStats | TPoolStats>`
150
+ * `error` {Error} (optional) The error to abort pending requests with.
151
+ * `callback` {Function} (optional) Invoked once every per-origin dispatcher has
152
+ been destroyed. When omitted, a {Promise} is returned.
153
+ * Returns: {Promise|void}
83
154
 
84
- See [`PoolStats`](/docs/docs/api/PoolStats.md) and [`ClientStats`](/docs/docs/api/ClientStats.md).
155
+ Forcefully destroys the agent and every dispatcher it owns, aborting all pending
156
+ requests. Implements [`Dispatcher.destroy()`][].
157
+
158
+ ### `agent.connect(options[, callback])`
159
+
160
+ <!-- YAML
161
+ added: v3.2.0
162
+ -->
163
+
164
+ See [`Dispatcher.connect()`][]. The request is routed to the dispatcher for
165
+ `options.origin`.
166
+
167
+ ### `agent.pipeline(options, handler)`
168
+
169
+ <!-- YAML
170
+ added: v3.2.0
171
+ -->
172
+
173
+ See [`Dispatcher.pipeline()`][]. The request is routed to the dispatcher for
174
+ `options.origin`.
175
+
176
+ ### `agent.request(options[, callback])`
177
+
178
+ <!-- YAML
179
+ added: v3.2.0
180
+ -->
181
+
182
+ See [`Dispatcher.request()`][]. The request is routed to the dispatcher for
183
+ `options.origin`.
184
+
185
+ ```mjs
186
+ import { Agent } from 'undici'
187
+
188
+ const agent = new Agent()
189
+ const { statusCode, body } = await agent.request({
190
+ origin: 'http://localhost:3000',
191
+ path: '/',
192
+ method: 'GET',
193
+ })
194
+
195
+ console.log('response received', statusCode)
196
+ console.log('data', await body.text())
197
+ ```
198
+
199
+ ### `agent.stream(options, factory[, callback])`
200
+
201
+ <!-- YAML
202
+ added: v3.2.0
203
+ -->
204
+
205
+ See [`Dispatcher.stream()`][]. The request is routed to the dispatcher for
206
+ `options.origin`.
207
+
208
+ ### `agent.upgrade(options[, callback])`
209
+
210
+ <!-- YAML
211
+ added: v3.2.0
212
+ -->
213
+
214
+ See [`Dispatcher.upgrade()`][]. The request is routed to the dispatcher for
215
+ `options.origin`.
216
+
217
+ ### Event: `'connect'`
218
+
219
+ <!-- YAML
220
+ added: v6.6.0
221
+ -->
222
+
223
+ * `origin` {URL}
224
+ * `targets` {Array<Dispatcher>} The dispatchers involved, starting with this
225
+ `Agent` followed by the per-origin dispatcher chain.
226
+
227
+ Emitted when a socket has been created for an origin and is ready to receive
228
+ requests. Forwarded from the underlying dispatcher's [`'connect'`][] event.
229
+
230
+ ### Event: `'disconnect'`
231
+
232
+ <!-- YAML
233
+ added: v6.6.0
234
+ -->
235
+
236
+ * `origin` {URL}
237
+ * `targets` {Array<Dispatcher>} The dispatchers involved, starting with this
238
+ `Agent`.
239
+ * `error` {Error}
240
+
241
+ Emitted when a socket for an origin has disconnected. Forwarded from the
242
+ underlying dispatcher's [`'disconnect'`][] event.
243
+
244
+ ### Event: `'connectionError'`
245
+
246
+ <!-- YAML
247
+ added: v6.6.0
248
+ -->
249
+
250
+ * `origin` {URL}
251
+ * `targets` {Array<Dispatcher>} The dispatchers involved, starting with this
252
+ `Agent`.
253
+ * `error` {Error}
254
+
255
+ Emitted when a connection attempt for an origin fails. Forwarded from the
256
+ underlying dispatcher's [`'connectionError'`][] event.
257
+
258
+ ### Event: `'drain'`
259
+
260
+ <!-- YAML
261
+ added: v6.6.0
262
+ -->
263
+
264
+ * `origin` {URL}
265
+ * `targets` {Array<Dispatcher>} The dispatchers involved, starting with this
266
+ `Agent`.
267
+
268
+ Emitted when an origin's dispatcher is no longer busy and can accept more
269
+ requests. Forwarded from the underlying dispatcher's [`'drain'`][] event.
270
+
271
+ [`'connect'`]: Dispatcher.md#event-connect
272
+ [`'connectionError'`]: Dispatcher.md#event-connectionerror
273
+ [`'disconnect'`]: Dispatcher.md#event-disconnect
274
+ [`'drain'`]: Dispatcher.md#event-drain
275
+ [`Client`]: Client.md#class-client
276
+ [`ClientStats`]: ClientStats.md
277
+ [`Dispatcher.close()`]: Dispatcher.md#dispatcherclosecallback-promise
278
+ [`Dispatcher.connect()`]: Dispatcher.md#dispatcherconnectoptions-callback
279
+ [`Dispatcher.destroy()`]: Dispatcher.md#dispatcherdestroyerror-callback-promise
280
+ [`Dispatcher.dispatch()`]: Dispatcher.md#dispatcherdispatchoptions-handler
281
+ [`Dispatcher.pipeline()`]: Dispatcher.md#dispatcherpipelineoptions-handler
282
+ [`Dispatcher.request()`]: Dispatcher.md#dispatcherrequestoptions-callback
283
+ [`Dispatcher.stream()`]: Dispatcher.md#dispatcherstreamoptions-factory-callback
284
+ [`Dispatcher.upgrade()`]: Dispatcher.md#dispatcherupgradeoptions-callback
285
+ [`Pool`]: Pool.md#class-pool
286
+ [`PoolStats`]: PoolStats.md
287
+ [`agent.close()`]: #agentclosecallback
288
+ [`agent.destroy()`]: #agentdestroyerror-callback
289
+ [`fetch`]: Fetch.md
290
+ [`request`]: Dispatcher.md#dispatcherrequestoptions-callback
291
+ [`stream`]: Dispatcher.md#dispatcherstreamoptions-factory-callback