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: clarify http.request language #2415

Closed
wants to merge 1 commit into from
Closed

doc: clarify http.request language #2415

wants to merge 1 commit into from

Conversation

skeggse
Copy link
Contributor

@skeggse skeggse commented Aug 18, 2015

Improve messaging for http.request's host and hostname parameters, as per nodejs/node-v0.x-archive#8990. I can't even count the number of times I've looked at the http docs to see whether host or hostname lets you include a port for http.request.

The current language in the docs says that the host parameter is "A domain name or IP address of the server to issue the request to. Defaults to 'localhost'," and described the hostname parameter with "To support url.parse() hostname is preferred over host." The host description actually fits the hostname parameter better, and it seems like the host description needs to say something about allowing a port.

@skeggse skeggse changed the title Update http.markdown doc: clarify http.request language Aug 18, 2015
Improve messaging for http.request's host and hostname parameters, as per
nodejs/node-v0.x-archive#8990. I can't even count the number of times I've looked at the
http docs to see whether host or hostname lets you include a port for
http.request.

The current language in the docs says that the host parameter is "A domain name
or IP address of the server to issue the request to. Defaults to 'localhost',"
and described the hostname parameter with "To support url.parse() hostname is
preferred over host." The host description actually fits the hostname parameter
better, and it seems like the host description needs to say something about
allowing a port.

Signed-off-by: Eli Skeggs <[email protected]>
@thefourtheye thefourtheye added the doc Issues and PRs related to the documentations. label Aug 18, 2015
@brendanashworth
Copy link
Contributor

Related: #2271

@brendanashworth brendanashworth added the http Issues or PRs related to the http subsystem. label Aug 18, 2015
@silverwind
Copy link
Contributor

I wrote that last change to these docs, and based on this line I interpreted the host and hostname options as true aliases. Am I wrong?

@skeggse
Copy link
Contributor Author

skeggse commented Aug 18, 2015

I'm pretty sure they weren't at one point. I haven't been keeping up with Node, and just migrated my PR from forever ago at the request of the joyent/node maintainers.

@skeggse skeggse closed this Aug 18, 2015
@skeggse
Copy link
Contributor Author

skeggse commented Aug 18, 2015

If someone discovers that this PR is actually valid or something, feel free to comment.

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.

4 participants