-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.
Description
- Version: 6.5.0
- Platform: Linux 3.10.0-327.13.1.el7.x86_64
- Subsystem: https
I modify globalAlgent to use proxy.
Next code:
var https = require("https")
var url = require("url")
https.globalAgent = MyProxyAgent
let parsedURL = url.parse(urlString)
parsedURL.method = 'POST'
let req = https.request(parsedURL, console.log)
req.on("error", console.log)
req.end()
this give me error:
Error: connect ECONNREFUSED
But if i paste this code parsedURL.agent = https.globalAgent before https.request all works fine.
Also i tried to modify http.globalAgent. It isn't work.
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.