Skip to content

http: make `globalAgent` of `http` and `https` as overridable properties

Rodrigo Muino Tomonari requested to merge github/fork/diorahman/issue-9057 into master
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http, https

Description of change

The http.globalAgent and https.globalAgent previously cannot be overridden directly by reassigning new a value.

By exposing the globalAgents of http and https, now it can be reassigned by:

http.globalAgent = new MyAgent();
https.globalAgent = new MySecureAgent();

Fix #9057 (closed)

Merge request reports

Loading