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

doc: merging behavior of writeHead vs setHeader #5081

Closed
wants to merge 1 commit into from
Closed

doc: merging behavior of writeHead vs setHeader #5081

wants to merge 1 commit into from

Conversation

a0viedo
Copy link
Member

@a0viedo a0viedo commented Feb 4, 2016

Original contribution of @aredridel with some minor fixes discussed at #3895.

cc @nodejs/documentation

@bengl
Copy link
Member

bengl commented Feb 4, 2016

It may also be worth noting this in the response.setHeader(), perhaps just to make sure the order of precedence is understood when using either method.


```js
// returns content-type = text/plain
const server = http.createServer( (req,res) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the extra space between (s

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked over other code examples in the same file to maintain consistency and found:

[a0viedo@arya node]$ grep doc/api/http.markdown -r -e "((" | wc -l
0
[a0viedo@arya node]$ grep doc/api/http.markdown -r -e "( (" | wc -l
3

I don't have any context in which one is following the style, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(( is what we would use in core.

@silverwind silverwind added the doc Issues and PRs related to the documentations. label Feb 4, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Feb 4, 2016

LGTM, but @bengl's comment is worth addressing as well.

@mscdex mscdex added the http Issues or PRs related to the http subsystem. label Feb 4, 2016
@a0viedo
Copy link
Member Author

a0viedo commented Feb 5, 2016

Updated with the comments from @bengl and @cjihrig

@silverwind
Copy link
Contributor

LGTM. Landed in 3da7d13.

silverwind pushed a commit that referenced this pull request Feb 9, 2016
PR-URL: #5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@silverwind silverwind closed this Feb 9, 2016
rvagg pushed a commit that referenced this pull request Feb 10, 2016
PR-URL: #5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
PR-URL: #5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
PR-URL: #5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
PR-URL: #5081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants