Skip to content

Commit

Permalink
feat: mark EnvHttpProxyAgent as stable (#4049)
Browse files Browse the repository at this point in the history
* docs: mark `EnvHttpProxyAgent` as stable

* remove experimental warning
  • Loading branch information
aduh95 authored Feb 7, 2025
1 parent d685d38 commit f798628
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions docs/docs/api/EnvHttpProxyAgent.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Class: EnvHttpProxyAgent

Stability: Experimental.

Extends: `undici.Dispatcher`

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.
Expand Down
9 changes: 0 additions & 9 deletions lib/dispatcher/env-http-proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const DEFAULT_PORTS = {
'https:': 443
}

let experimentalWarned = false

class EnvHttpProxyAgent extends DispatcherBase {
#noProxyValue = null
#noProxyEntries = null
Expand All @@ -21,13 +19,6 @@ class EnvHttpProxyAgent extends DispatcherBase {
super()
this.#opts = opts

if (!experimentalWarned) {
experimentalWarned = true
process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', {
code: 'UNDICI-EHPA'
})
}

const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts

this[kNoProxyAgent] = new Agent(agentOpts)
Expand Down

0 comments on commit f798628

Please sign in to comment.