Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: allow http.request() over tls #1616

Conversation

brendanashworth
Copy link
Contributor

This PR refractors all the HTTPS request logic into the respective HTTP files, leaving only backwards compatibility stuff. Users choose by passing protocol in the http.request options, or by the respective agent. See iojs/NG#12.

No code was deprecated, but https.Agent was deprecated (only in the documentation) in favor of http.Agent, which it is now just a reference to. I had to edit one test because it sniffed error messages (I made it more general now), I hope that doesn't make this semver-major.

... and if you're feeling adventurous:

http.globalAgent.protocol = 'https:';

@brendanashworth brendanashworth added http Issues or PRs related to the http subsystem. https Issues or PRs related to the https subsystem. semver-minor PRs that contain new features and should be released in the next minor version. labels May 5, 2015
@brendanashworth brendanashworth changed the title allow http.request() over tls http: allow http.request() over tls May 5, 2015
@Fishrock123
Copy link
Contributor

Going to solicit @nodejs/tsc for opinions / review

This commit refractors the Agent implementation into the respective HTTP
submodules.

For backwards compatibility, some changes were made to the https default
agent.

A developer can enable HTTPS by default for all requests by setting:

http.globalAgent.protocol = 'https:'
@brendanashworth
Copy link
Contributor Author

I guess there isn't interest in having this right now, so I'll close it and leave the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. https Issues or PRs related to the https subsystem. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants