node icon indicating copy to clipboard operation
node copied to clipboard

http: add http.setGlobalProxyFromEnv()

Open joyeecheung opened this issue 3 weeks ago • 6 comments

This adds an API to dynamically enable built-in proxy support for all of fetch() and http.request()/https.request(), so that users do not have to be aware of them all and configure them one by one.

joyeecheung avatar Dec 04 '25 23:12 joyeecheung

Review requested:

  • [ ] @nodejs/crypto
  • [ ] @nodejs/http
  • [ ] @nodejs/net

nodejs-github-bot avatar Dec 04 '25 23:12 nodejs-github-bot

Codecov Report

:x: Patch coverage is 93.18182% with 6 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 88.51%. Comparing base (644fb88) to head (ae24120). :warning: Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
lib/http.js 95.00% 3 Missing :warning:
lib/internal/http.js 87.50% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60953      +/-   ##
==========================================
- Coverage   88.51%   88.51%   -0.01%     
==========================================
  Files         703      703              
  Lines      208394   208500     +106     
  Branches    40193    40212      +19     
==========================================
+ Hits       184470   184560      +90     
- Misses      15934    15958      +24     
+ Partials     7990     7982       -8     
Files with missing lines Coverage Δ
lib/_http_agent.js 97.30% <100.00%> (-0.02%) :arrow_down:
lib/https.js 98.22% <100.00%> (-0.02%) :arrow_down:
lib/http.js 98.83% <95.00%> (-1.17%) :arrow_down:
lib/internal/http.js 92.11% <87.50%> (-3.66%) :arrow_down:

... and 55 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 05 '25 00:12 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/70399/

nodejs-github-bot avatar Dec 06 '25 09:12 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/70427/

nodejs-github-bot avatar Dec 08 '25 14:12 nodejs-github-bot

The https://github.com/nodejs/node/labels/notable-change label has been added by @joyeecheung.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

github-actions[bot] avatar Dec 08 '25 14:12 github-actions[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/70430/

nodejs-github-bot avatar Dec 08 '25 15:12 nodejs-github-bot

Landed in c0108bfc55032d06ed0e9fe2802b437603b80a7d

nodejs-github-bot avatar Dec 10 '25 16:12 nodejs-github-bot