@openclaw/discord 2026.6.33 → 2026.6.35

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 (179) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{api-CjnGBhM3.js → api-1GXlSrYP.js} +42 -21
  3. package/dist/api.js +14 -14
  4. package/dist/{approval-handler.runtime-BWPQrzpP.js → approval-handler.runtime-Dv4p7REU.js} +3 -3
  5. package/dist/{audit-BwJ_2OjL.js → audit-DEVi9nIs.js} +3 -3
  6. package/dist/{channel-Ddnonoy4.js → channel-CQIRiosn.js} +15 -15
  7. package/dist/{channel-actions-CwmIqnYN.js → channel-actions-JziPEcBU.js} +2 -2
  8. package/dist/{channel-actions.runtime-DvpTfaJ4.js → channel-actions.runtime-D7L47LY3.js} +5 -5
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel.setup-glZ5Y98a.js → channel.setup-oMeR19Cc.js} +2 -2
  11. package/dist/{components-j6lTZBsT.js → components-_s5UPJqU.js} +1 -1
  12. package/dist/{conversation-identity-36FFBwm5.js → conversation-identity-B0k94-bz.js} +2 -2
  13. package/dist/{directory-config-BYMFzL29.js → directory-config-CD1svkyN.js} +1 -1
  14. package/dist/directory-contract-api.js +1 -1
  15. package/dist/{directory-live-9JtJCiu8.js → directory-live-DBTsSRxl.js} +5 -5
  16. package/dist/{handle-action.guild-admin-xxGYrp-I.js → handle-action.guild-admin-CYIFMxh-.js} +2 -2
  17. package/dist/index.js +1 -1
  18. package/dist/{manager.runtime-BK6cf2Zu.js → manager.runtime-BZVdGX2d.js} +17 -9
  19. package/dist/{message-handler-BqpJIavO.js → message-handler-DZd9Bpq8.js} +7 -6
  20. package/dist/{message-handler.preflight-C90MxCcv.js → message-handler.preflight-Axv9J9EO.js} +12 -11
  21. package/dist/{message-handler.process-CeQ7Bd_3.js → message-handler.process-CG0zFS-Z.js} +10 -10
  22. package/dist/{message-utils-CJeAoISH.js → message-utils-Dbuw27gd.js} +1 -1
  23. package/dist/{outbound-adapter-Dxs6iKEq.js → outbound-adapter-CKC_kmUN.js} +6 -6
  24. package/dist/pluralkit-CfTReLl3.js +40 -0
  25. package/dist/{probe-esE_Oqdm.js → probe-DcgZIpyF.js} +3 -2
  26. package/dist/{probe.runtime-C3Atgpvr.js → probe.runtime-CVwM9L5E.js} +1 -1
  27. package/dist/{provider-C7376XFH.js → provider-CwwSXIIj.js} +102 -37
  28. package/dist/{provider-session.runtime-CCdqogGf.js → provider-session.runtime-reBWkqHZ.js} +3 -3
  29. package/dist/provider.runtime-BsmTLYS_.js +2 -0
  30. package/dist/{resolve-allowlist-common-3gB2Gpmm.js → resolve-allowlist-common-D7bZqAw3.js} +3 -3
  31. package/dist/{resolve-channels-B3gQf8QL.js → resolve-channels--oE-RnO6.js} +6 -6
  32. package/dist/{resolve-users-BO10y5fJ.js → resolve-users-QXo8CXBU.js} +5 -5
  33. package/dist/{runtime-CFlR3L9X.js → runtime-CF7ramAs.js} +7 -7
  34. package/dist/runtime-api.actions.js +2 -2
  35. package/dist/runtime-api.js +19 -19
  36. package/dist/runtime-api.lookup.js +5 -5
  37. package/dist/runtime-api.monitor-CzF8MUl_.js +6 -0
  38. package/dist/runtime-api.monitor.js +5 -5
  39. package/dist/runtime-api.send.js +5 -5
  40. package/dist/runtime-api.threads.js +3 -3
  41. package/dist/{send-JHxfT4Pk.js → send-Bb295iHT.js} +5 -5
  42. package/dist/{send.components-CN35E2Ck.js → send.components-COkDUO3B.js} +4 -4
  43. package/dist/{send.outbound-B-cA1Esv.js → send.outbound-B_sk0hNe.js} +3 -3
  44. package/dist/{send.receipt-CGecJDin.js → send.receipt-Cli6_9Sn.js} +19 -7
  45. package/dist/{send.shared-vcbfThdy.js → send.shared-BCG7MWnP.js} +2 -2
  46. package/dist/session-binding-contract-api.js +1 -1
  47. package/dist/setup-plugin-api.js +1 -1
  48. package/dist/{subagent-hooks-20wXhVzZ.js → subagent-hooks-CtqoWK4x.js} +2 -2
  49. package/dist/subagent-hooks-api.js +1 -1
  50. package/dist/{system-events-DR27TE7p.js → system-events-BxGNk_wE.js} +1 -1
  51. package/dist/{target-resolver-CDi1gI90.js → target-resolver-BcoK6b0g.js} +2 -2
  52. package/dist/targets-Q-ZoP7K4.js +3 -0
  53. package/dist/{thread-bindings-DU4T6nDo.js → thread-bindings-DJ_HT6GJ.js} +4 -4
  54. package/dist/{thread-bindings.discord-api-CYkr-3Gj.js → thread-bindings.discord-api-OPyjvgyz.js} +4 -4
  55. package/dist/{thread-bindings.manager-BqWs1UE2.js → thread-bindings.manager-Cd2HAVw_.js} +3 -3
  56. package/dist/{transcripts-source-D-lBI5ZD.js → transcripts-source-CPf5gURy.js} +1 -1
  57. package/dist/transcripts-source-api.js +1 -1
  58. package/dist/{typing-xr05bL-r.js → typing-DY0cwLdg.js} +1 -1
  59. package/node_modules/undici/README.md +8 -2
  60. package/node_modules/undici/docs/docs/api/Agent.md +248 -44
  61. package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
  62. package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
  63. package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
  64. package/node_modules/undici/docs/docs/api/Client.md +386 -179
  65. package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
  66. package/node_modules/undici/docs/docs/api/Connector.md +118 -36
  67. package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
  68. package/node_modules/undici/docs/docs/api/Cookies.md +122 -71
  69. package/node_modules/undici/docs/docs/api/Debug.md +34 -18
  70. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
  71. package/node_modules/undici/docs/docs/api/Dispatcher.md +485 -1102
  72. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +102 -87
  73. package/node_modules/undici/docs/docs/api/Errors.md +503 -40
  74. package/node_modules/undici/docs/docs/api/EventSource.md +298 -32
  75. package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
  76. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
  77. package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
  78. package/node_modules/undici/docs/docs/api/Interceptors.md +418 -0
  79. package/node_modules/undici/docs/docs/api/MockAgent.md +333 -314
  80. package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
  81. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
  82. package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
  83. package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
  84. package/node_modules/undici/docs/docs/api/MockPool.md +321 -258
  85. package/node_modules/undici/docs/docs/api/Pool.md +235 -43
  86. package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
  87. package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
  88. package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
  89. package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
  90. package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
  91. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
  92. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
  93. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +177 -196
  94. package/node_modules/undici/docs/docs/api/Util.md +68 -11
  95. package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
  96. package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
  97. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
  98. package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
  99. package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
  100. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
  101. package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
  102. package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
  103. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
  104. package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
  105. package/node_modules/undici/docs/docs/index.md +784 -0
  106. package/node_modules/undici/docs/docs/site.json +125 -0
  107. package/node_modules/undici/docs/docs/type-map.json +79 -0
  108. package/node_modules/undici/lib/api/api-request.js +7 -1
  109. package/node_modules/undici/lib/api/readable.js +42 -7
  110. package/node_modules/undici/lib/cache/memory-cache-store.js +56 -11
  111. package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
  112. package/node_modules/undici/lib/core/connect.js +16 -2
  113. package/node_modules/undici/lib/core/errors.js +20 -0
  114. package/node_modules/undici/lib/core/request.js +14 -3
  115. package/node_modules/undici/lib/core/symbols.js +3 -0
  116. package/node_modules/undici/lib/core/util.js +30 -2
  117. package/node_modules/undici/lib/dispatcher/agent.js +10 -5
  118. package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  119. package/node_modules/undici/lib/dispatcher/client-h1.js +74 -9
  120. package/node_modules/undici/lib/dispatcher/client-h2.js +483 -151
  121. package/node_modules/undici/lib/dispatcher/client.js +76 -30
  122. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  123. package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  124. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  125. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
  126. package/node_modules/undici/lib/dispatcher/proxy-agent.js +58 -7
  127. package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  128. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  129. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
  130. package/node_modules/undici/lib/global.js +36 -16
  131. package/node_modules/undici/lib/handler/cache-handler.js +297 -65
  132. package/node_modules/undici/lib/handler/cache-revalidation-handler.js +13 -3
  133. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  134. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  135. package/node_modules/undici/lib/handler/redirect-handler.js +26 -5
  136. package/node_modules/undici/lib/handler/retry-handler.js +238 -51
  137. package/node_modules/undici/lib/interceptor/cache.js +221 -58
  138. package/node_modules/undici/lib/interceptor/decompress.js +124 -15
  139. package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  140. package/node_modules/undici/lib/interceptor/dns.js +7 -0
  141. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  142. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  143. package/node_modules/undici/lib/mock/mock-interceptor.js +25 -7
  144. package/node_modules/undici/lib/mock/mock-utils.js +246 -27
  145. package/node_modules/undici/lib/util/cache.js +415 -71
  146. package/node_modules/undici/lib/util/date.js +23 -6
  147. package/node_modules/undici/lib/web/cookies/parse.js +150 -146
  148. package/node_modules/undici/lib/web/cookies/util.js +79 -9
  149. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  150. package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  151. package/node_modules/undici/lib/web/eventsource/util.js +1 -1
  152. package/node_modules/undici/lib/web/fetch/body.js +2 -1
  153. package/node_modules/undici/lib/web/fetch/constants.js +1 -1
  154. package/node_modules/undici/lib/web/fetch/index.js +17 -2
  155. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  156. package/node_modules/undici/lib/web/fetch/response.js +1 -3
  157. package/node_modules/undici/lib/web/fetch/util.js +10 -2
  158. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  159. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  160. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  161. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  162. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  163. package/node_modules/undici/package.json +4 -4
  164. package/node_modules/undici/types/client.d.ts +53 -3
  165. package/node_modules/undici/types/cookies.d.ts +1 -1
  166. package/node_modules/undici/types/dispatcher.d.ts +3 -3
  167. package/node_modules/undici/types/errors.d.ts +10 -0
  168. package/node_modules/undici/types/handlers.d.ts +2 -0
  169. package/node_modules/undici/types/interceptors.d.ts +2 -0
  170. package/node_modules/undici/types/mock-agent.d.ts +11 -10
  171. package/node_modules/undici/types/mock-interceptor.d.ts +5 -1
  172. package/node_modules/undici/types/proxy-agent.d.ts +7 -0
  173. package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
  174. package/npm-shrinkwrap.json +7 -7
  175. package/package.json +6 -5
  176. package/dist/pluralkit-DI6RYaVj.js +0 -24
  177. package/dist/provider.runtime-D1m66kDS.js +0 -2
  178. package/dist/runtime-api.monitor-4oc58TSk.js +0 -6
  179. package/dist/targets-C6yd3y8R.js +0 -3
@@ -1,52 +1,86 @@
1
- # Class: EnvHttpProxyAgent
1
+ # EnvHttpProxyAgent
2
2
 
3
- Extends: `undici.Dispatcher`
3
+ <!--introduced_in=v6.14.0-->
4
4
 
5
- EnvHttpProxyAgent automatically reads the proxy configuration from the environment variables `http_proxy`, `https_proxy`, and `no_proxy` and sets up the proxy agents accordingly. When `http_proxy` and `https_proxy` are set, `http_proxy` is used for HTTP requests and `https_proxy` is used for HTTPS requests. If only `http_proxy` is set, `http_proxy` is used for both HTTP and HTTPS requests. If only `https_proxy` is set, it is only used for HTTPS requests.
5
+ <!--type=module-->
6
6
 
7
- `no_proxy` is a comma or space-separated list of hostnames that should not be proxied. The list may contain leading wildcard characters (`*`). If `no_proxy` is set, the EnvHttpProxyAgent will bypass the proxy for requests to hosts that match the list. If `no_proxy` is set to `"*"`, the EnvHttpProxyAgent will bypass the proxy for all requests.
7
+ <!-- source_link=lib/dispatcher/env-http-proxy-agent.js -->
8
8
 
9
- Uppercase environment variables are also supported: `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. However, if both the lowercase and uppercase environment variables are set, the uppercase environment variables will be ignored.
9
+ > Stability: 2 - Stable
10
10
 
11
- ## `new EnvHttpProxyAgent([options])`
11
+ `EnvHttpProxyAgent` is a [`Dispatcher`][] that reads its proxy configuration from
12
+ the `http_proxy`, `https_proxy`, and `no_proxy` environment variables and routes
13
+ requests through the appropriate proxy automatically. Import it from `undici`:
12
14
 
13
- Arguments:
14
-
15
- * **options** `EnvHttpProxyAgentOptions` (optional) - extends the `Agent` options.
16
-
17
- Returns: `EnvHttpProxyAgent`
18
-
19
- ### Parameter: `EnvHttpProxyAgentOptions`
20
-
21
- Extends: [`AgentOptions`](/docs/docs/api/Agent.md#parameter-agentoptions)
22
-
23
- * **httpProxy** `string` (optional) - When set, it will override the `HTTP_PROXY` environment variable.
24
- * **httpsProxy** `string` (optional) - When set, it will override the `HTTPS_PROXY` environment variable.
25
- * **noProxy** `string` (optional) - When set, it will override the `NO_PROXY` environment variable.
26
-
27
- Examples:
28
-
29
- ```js
15
+ ```mjs
30
16
  import { EnvHttpProxyAgent } from 'undici'
31
-
32
- const envHttpProxyAgent = new EnvHttpProxyAgent()
33
- // or
34
- const envHttpProxyAgent = new EnvHttpProxyAgent({ httpProxy: 'my.proxy.server:8080', httpsProxy: 'my.proxy.server:8443', noProxy: 'localhost' })
35
17
  ```
36
18
 
37
- #### Example - EnvHttpProxyAgent instantiation
38
-
39
- This will instantiate the EnvHttpProxyAgent. It will not do anything until registered as the agent to use with requests.
40
-
41
- ```js
19
+ When `http_proxy` and `https_proxy` are both set, `http_proxy` is used for HTTP
20
+ requests and `https_proxy` is used for HTTPS requests. If only `http_proxy` is
21
+ set, it is used for both HTTP and HTTPS requests. If only `https_proxy` is set,
22
+ it is used only for HTTPS requests.
23
+
24
+ `no_proxy` is a comma- or space-separated list of hosts that must not be
25
+ proxied. Each entry may include a leading dot or `*.` wildcard (for example
26
+ `.example.com`) to match subdomains, and an optional `:port` suffix to restrict
27
+ the match to a specific port. A request bypasses the proxy when its host equals
28
+ an entry or is a subdomain of one. A trailing dot is ignored on both sides, so
29
+ `example.com.` and `example.com` match each other. Setting `no_proxy` to `*`
30
+ bypasses the proxy for every request.
31
+
32
+ The uppercase variants `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are also
33
+ honored. When both the lowercase and uppercase forms of a variable are set, the
34
+ lowercase form takes precedence and the uppercase form is ignored. The `no_proxy`
35
+ value is re-read from the environment on demand, so changes to it after the agent
36
+ is created take effect on subsequent requests; this does not apply when `noProxy`
37
+ is passed as an option.
38
+
39
+ ## Class: `EnvHttpProxyAgent`
40
+
41
+ <!-- YAML
42
+ added: v6.14.0
43
+ -->
44
+
45
+ * Extends: {Dispatcher}
46
+
47
+ ### `new EnvHttpProxyAgent([options])`
48
+
49
+ <!-- YAML
50
+ added: v6.14.0
51
+ -->
52
+
53
+ * `options` {EnvHttpProxyAgentOptions} Extends the [`ProxyAgent`][] options
54
+ (except `uri`). (optional)
55
+ * `httpProxy` {string} When set, overrides the `http_proxy` and `HTTP_PROXY`
56
+ environment variables. (optional)
57
+ * `httpsProxy` {string} When set, overrides the `https_proxy` and
58
+ `HTTPS_PROXY` environment variables. (optional)
59
+ * `noProxy` {string} When set, overrides the `no_proxy` and `NO_PROXY`
60
+ environment variables. (optional)
61
+ * Returns: {EnvHttpProxyAgent}
62
+
63
+ Creates a new `EnvHttpProxyAgent`. Any options other than `httpProxy`,
64
+ `httpsProxy`, and `noProxy` are forwarded to the underlying [`Agent`][] and
65
+ [`ProxyAgent`][] instances. Constructing the agent only configures it; it does
66
+ not affect any request until it is registered as a dispatcher, either globally
67
+ with `setGlobalDispatcher()` or per-request through the `dispatcher` option.
68
+
69
+ ```mjs
42
70
  import { EnvHttpProxyAgent } from 'undici'
43
71
 
44
72
  const envHttpProxyAgent = new EnvHttpProxyAgent()
73
+ // or, overriding the environment variables explicitly:
74
+ const envHttpProxyAgentWithOpts = new EnvHttpProxyAgent({
75
+ httpProxy: 'my.proxy.server:8080',
76
+ httpsProxy: 'my.proxy.server:8443',
77
+ noProxy: 'localhost'
78
+ })
45
79
  ```
46
80
 
47
- #### Example - Basic Proxy Fetch with global agent dispatcher
81
+ #### Example - Proxied `fetch()` with the global dispatcher
48
82
 
49
- ```js
83
+ ```mjs
50
84
  import { setGlobalDispatcher, fetch, EnvHttpProxyAgent } from 'undici'
51
85
 
52
86
  const envHttpProxyAgent = new EnvHttpProxyAgent()
@@ -56,12 +90,12 @@ const response = await fetch('http://localhost:3000/foo')
56
90
 
57
91
  console.log('response received', response.status) // response received 200
58
92
 
59
- const data = await response.json() // data { foo: "bar" }
93
+ const data = await response.json() // data { foo: 'bar' }
60
94
  ```
61
95
 
62
- #### Example - Basic Proxy Request with global agent dispatcher
96
+ #### Example - Proxied `request()` with the global dispatcher
63
97
 
64
- ```js
98
+ ```mjs
65
99
  import { setGlobalDispatcher, request, EnvHttpProxyAgent } from 'undici'
66
100
 
67
101
  const envHttpProxyAgent = new EnvHttpProxyAgent()
@@ -76,17 +110,16 @@ for await (const data of body) {
76
110
  }
77
111
  ```
78
112
 
79
- #### Example - Basic Proxy Request with local agent dispatcher
113
+ #### Example - Proxied `request()` with a local dispatcher
80
114
 
81
- ```js
115
+ ```mjs
82
116
  import { EnvHttpProxyAgent, request } from 'undici'
83
117
 
84
118
  const envHttpProxyAgent = new EnvHttpProxyAgent()
85
119
 
86
- const {
87
- statusCode,
88
- body
89
- } = await request('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent })
120
+ const { statusCode, body } = await request('http://localhost:3000/foo', {
121
+ dispatcher: envHttpProxyAgent
122
+ })
90
123
 
91
124
  console.log('response received', statusCode) // response received 200
92
125
 
@@ -95,62 +128,44 @@ for await (const data of body) {
95
128
  }
96
129
  ```
97
130
 
98
- #### Example - Basic Proxy Fetch with local agent dispatcher
131
+ #### Example - Proxied `fetch()` with a local dispatcher
99
132
 
100
- ```js
133
+ ```mjs
101
134
  import { EnvHttpProxyAgent, fetch } from 'undici'
102
135
 
103
136
  const envHttpProxyAgent = new EnvHttpProxyAgent()
104
137
 
105
- const response = await fetch('http://localhost:3000/foo', { dispatcher: envHttpProxyAgent })
138
+ const response = await fetch('http://localhost:3000/foo', {
139
+ dispatcher: envHttpProxyAgent
140
+ })
106
141
 
107
142
  console.log('response received', response.status) // response received 200
108
143
 
109
- const data = await response.json() // data { foo: "bar" }
144
+ const data = await response.json() // data { foo: 'bar' }
110
145
  ```
111
146
 
112
- ## Instance Methods
113
-
114
- ### `EnvHttpProxyAgent.close([callback])`
115
-
116
- Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
117
-
118
- ### `EnvHttpProxyAgent.destroy([error, callback])`
119
-
120
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
121
-
122
- ### `EnvHttpProxyAgent.dispatch(options, handler: AgentDispatchOptions)`
123
-
124
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
125
-
126
- #### Parameter: `AgentDispatchOptions`
127
-
128
- Extends: [`DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions)
129
-
130
- * **origin** `string | URL`
131
-
132
- Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
133
-
134
- ### `EnvHttpProxyAgent.connect(options[, callback])`
135
-
136
- See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
137
-
138
- ### `EnvHttpProxyAgent.dispatch(options, handler)`
139
-
140
- Implements [`Dispatcher.dispatch(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
141
-
142
- ### `EnvHttpProxyAgent.pipeline(options, handler)`
143
-
144
- See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
145
-
146
- ### `EnvHttpProxyAgent.request(options[, callback])`
147
+ ### `envHttpProxyAgent.dispatch(options, handler)`
147
148
 
148
- See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
149
+ <!-- YAML
150
+ added: v6.14.0
151
+ -->
149
152
 
150
- ### `EnvHttpProxyAgent.stream(options, factory[, callback])`
153
+ * `options` {AgentDispatchOptions}
154
+ * `origin` {string|URL}
155
+ * `handler` {DispatchHandler}
156
+ * Returns: {boolean}
151
157
 
152
- See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
158
+ Dispatches a request through the proxy selected for `options.origin`. The origin's
159
+ protocol, host, and port are compared against the `no_proxy` configuration: when
160
+ the host should be proxied, the request is routed to the HTTPS proxy agent for
161
+ `https:` origins or the HTTP proxy agent otherwise; when the host is excluded by
162
+ `no_proxy`, the request is sent directly through a non-proxying [`Agent`][].
153
163
 
154
- ### `EnvHttpProxyAgent.upgrade(options[, callback])`
164
+ This method is not normally called directly. Use the higher-level
165
+ [`Dispatcher`][] methods such as [`dispatcher.request()`][] or the top-level
166
+ `request()` and `fetch()` helpers instead.
155
167
 
156
- See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
168
+ [`Agent`]: Agent.md#class-agent
169
+ [`Dispatcher`]: Dispatcher.md#class-dispatcher
170
+ [`ProxyAgent`]: ProxyAgent.md#class-proxyagent
171
+ [`dispatcher.request()`]: Dispatcher.md#dispatcherrequestoptions-callback