-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: fix http.ClientRequest method descriptions #15163
doc: fix http.ClientRequest method descriptions #15163
Conversation
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.
I'm not sure the terminology of looking at request headers as "technically queued" is useful when explaining the concept.
That said, it's what we're currently doing in HTTP1 responses so I'm not going to block on it.
Could you please change the text in:
The header is still mutable using the setHeader(name, value), getHeader(name), removeHeader(name) API. The actual header will be sent along with the first data chunk or when closing the connection.
to links to the new method?
doc/api/http.md
Outdated
* `name` {string} | ||
* `value` {string} | ||
|
||
Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name. |
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.
I'm not sure the meaning of 'for implicit headers' is clear enough.
doc/api/http.md
Outdated
|
||
* `name` {string} | ||
|
||
Removes a header that's queued for implicit sending. |
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.
I don't think 'queued for implicit sending' is terminology I want to expose our users to.
doc/api/http.md
Outdated
* `name` {string} | ||
* Returns: {string} | ||
|
||
Reads out a header that's already been queued. Note that the name is case insensitive. |
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.
'Reads out a header on the request' maybe?
cbbd33e
to
6670c2b
Compare
@benjamingr, I commit new changes, thanks for your first review. |
doc/api/http.md
Outdated
* `name` {string} | ||
* `value` {string} | ||
|
||
Sets a single header value for headers object. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name. |
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.
couple of things here:
- This is a long line. Please line wrap at <= 80 chars
- Please avoid the use of
you
in the docs.
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.
thank you for this! have a couple of things that need fixing!
6670c2b
to
44c0877
Compare
I think everything got addressed |
@BridgeAR, @jasnell, @benjamingr , should I rebase master and push the new commits into this branch before the next review ? |
rebasing is always a good idea! :-) |
ok so I rebase before the merge, I leave a comment after I push |
44c0877
to
bcdc178
Compare
Ok, @BridgeAR, @jasnell, @benjamingr, the branch is up to date :) thanks for your reviews. |
fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. Fixes: nodejs#15048
bcdc178
to
adc1d28
Compare
fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. PR-URL: #15163 Fixes: #15048 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in ca2c73c |
fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. PR-URL: nodejs/node#15163 Fixes: nodejs/node#15048 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. PR-URL: #15163 Fixes: #15048 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. PR-URL: nodejs/node#15163 Fixes: nodejs/node#15048 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
doc: fix http.ClientRequest method descriptions fix documentation for methods getHeader, setHeader and removeHeader for http.ClientRequest class. The documentation said these functions can be called but they're wasn't describe into the API description yet. add parameters and general description for each methods. PR-URL: nodejs#15163 Fixes: nodejs#15048 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> assert: use Same-value equality in deepStrictEqual PR-URL: nodejs#15398 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> formatting fix and scar deleted
fix documentation for methods getHeader, setHeader and removeHeader
for http.ClientRequest class. The documentation said these functions
can be called but they're wasn't describe into the API description yet.
add parameters and general description for each methods.
Fixes: #15048
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)