-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
doc: add Array type in http request headers #58049
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
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
doc/api/http.md
Outdated
@@ -3818,7 +3818,7 @@ changes: | |||
* `family` {number} IP address family to use when resolving `host` or | |||
`hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and | |||
v6 will be used. | |||
* `headers` {Object} An object containing request headers. | |||
* `headers` {Object|Array} An object or an array of strings containing request headers. The array is in the same format as request.rawHeaders. |
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.
* `headers` {Object|Array} An object or an array of strings containing request headers. The array is in the same format as request.rawHeaders. | |
* `headers` {Object|Array} An object or an array of strings containing request headers. The array is in the same format as [`message.rawHeaders`][]. |
and
[`message.rawHeaders`]: #messagerawheaders
at the end of the file.
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 :)
I've updated the commit with the suggested change to reference [message.rawHeaders][].
Please let me know if there's anything else needed. See ad2fb4d.
Document that the headers option in http.request() can be either an object or an array of strings, similar to message.rawHeaders. PR-URL: nodejs#58049 Fixes: nodejs#57986 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ff83ffa
to
ad2fb4d
Compare
Document that the headers option in http.request() can be either an object or an array of strings, similar to message.rawHeaders. PR-URL: nodejs#58049 Fixes: nodejs#57986 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ad2fb4d
to
0b8059e
Compare
I've fixed the commit message issues. |
@@ -3818,7 +3818,7 @@ changes: | |||
* `family` {number} IP address family to use when resolving `host` or | |||
`hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and | |||
v6 will be used. | |||
* `headers` {Object} An object containing request headers. | |||
* `headers` {Object|Array} An object or an array of strings containing request headers. The array is in the same format as [`message.rawHeaders`][]. |
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: limit line length to 80 characters, and remove extra space
* `headers` {Object|Array} An object or an array of strings containing request headers. The array is in the same format as [`message.rawHeaders`][]. | |
* `headers` {Object|Array} An object or an array of strings containing request | |
headers. The array is in the same format as [`message.rawHeaders`][]. |
The http.request allows sending headers as an array of strings.
Fixes: #57986