You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Here's a silly question: why do we have to require different submodules and call the same method with slightly different arguments when we can easily merge the two into a single call? Every place where http/https is an option, we repeat the same silliness of checking for TLS options and based on that requiring a different agent, etc.
Can we just enhance http.createServer() to accept options, and if those options include tls, to return the right server? This will be fully backwards compatible, but will make for much cleaner code elsewhere.
The text was updated successfully, but these errors were encountered:
Well, the thing is that https server technically won't work without the options object, while http don't really need any. I don't mind adding an argument to http.Server though.
Here's a silly question: why do we have to require different submodules and call the same method with slightly different arguments when we can easily merge the two into a single call? Every place where http/https is an option, we repeat the same silliness of checking for TLS options and based on that requiring a different agent, etc.
Can we just enhance http.createServer() to accept options, and if those options include
tls
, to return the right server? This will be fully backwards compatible, but will make for much cleaner code elsewhere.The text was updated successfully, but these errors were encountered: