-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
doc: argument types for https & argument types cleanup for http #11681
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
Conversation
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put them in separate entries and mention they are aliases?
doc/api/http.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er..I think lowercased primitive types are preferred after #11167?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I had read the summary (which said the opposite) but not the comment thread. Will change.
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buffer[] | string[] | Object[] are supported by the tools now..
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 80-characters wrap?
d0bee48 to
ad4ef9c
Compare
|
Changes made. |
doc/api/http.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http.globalAgent would be clearer
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https.globalAgent would be clearer(notice https.globalAgent !== http.globalAgent)
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge the type signatures with option explanations below? Thanks!
ad4ef9c to
a892437
Compare
|
Updated. 😄 |
a892437 to
9a2862f
Compare
jasnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there!
doc/api/http.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elsewhere in the change you using the pattern Default = ....
Would you please update for consistency? Thank you! 😄
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace your with the. (in generally we avoid use of pronouns such as you and your in the docs. Thank you!
9a2862f to
bcf0909
Compare
|
Changes made. |
72af375 to
a2ac3ea
Compare
doc/api/http.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I am not sure if the options need to be explained here since most of them are just passed to http.request, and that one has a more detailed explanation about these options? Maybe something like
* `options` {Object | string}: Takes the same values as `options` in
[`http.request(options[, callback])`][] except that `method` is set to `GET`
is enough? This way future updates to http.request don't need to take care of the explanations here.
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, tls.createServer() and tls.createSecureContext() have a detailed explanation about these options, so linking to the docs of them should be enough. (Of course the signature of options itself is still necessary)
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto for http.get
doc/api/https.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto for http.request, moduloagent, port, protocol differences
jasnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once @joyeecheung is happy with it also
5966723 to
3f63bd3
Compare
|
Updated. 😄 |
3f63bd3 to
471bb13
Compare
joyeecheung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks!
|
Landed in f6b0309...9772fb9 |
|
This is not landing clearly in |
Ref: nodejs#9399 PR-URL: nodejs#11681 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Ref: nodejs#9399 PR-URL: nodejs#11681 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Ref: nodejs#9399 PR-URL: nodejs#11681 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Ref: nodejs#9399 PR-URL: nodejs#11681 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
Are the changes relevant to v6.x? italoacasas@9c3cf13 cherry picks clean. |
|
ping |
| Returns a new HTTPS web server object. The `options` is similar to | ||
| [`tls.createServer()`][]. The `requestListener` is a function which is | ||
| automatically added to the `'request'` event. | ||
| - `options` {Object} Accepts `options` from [`tls.createServer()`][] and [`tls.createSecureContext()`][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long lines. can you please make sure to wrap all lines at <= 80 chars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HA! oops lol... totally missed that this had already landed lol :-D
|
|
||
| The following additional `options` from [`tls.connect()`][] are also accepted when using a | ||
| custom [`Agent`][]: | ||
| `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`, `secureProtocol`, `servername` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joyeecheung does this section apply to v6.x as well?
|
Landed on v6.x-staging, LMK if that was a mistake. |
Checklist
Affected core subsystem(s)
documentation
Description of changes
Added argument data types to the docs for the
httpsmodule.Added missing argument data types to the docs for the
httpmodule.Lowercased primitive data types in the
httpmodule for consistency.Changed
Integerdata types toNumberfor consistency.Issue