Skip to content

doc: clarify http.request language - #2415

Closed
skeggse wants to merge 1 commit into
nodejs:masterfrom
skeggse:patch-1
Closed

doc: clarify http.request language#2415
skeggse wants to merge 1 commit into
nodejs:masterfrom
skeggse:patch-1

Conversation

@skeggse

Copy link
Copy Markdown
Contributor

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.

@skeggseskeggse changed the title Update http.markdowndoc: clarify http.request languageAug 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 <skeggse@gmail.com>
@thefourtheyethefourtheye added the doc Issues and PRs related to the documentations. label Aug 18, 2015
@brendanashworth

Copy link
Copy Markdown
Contributor

Related: #2271

@brendanashworthbrendanashworth added the http Issues or PRs related to the http subsystem. label Aug 18, 2015
@silverwind

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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.

@skeggseskeggse closed this Aug 18, 2015
@skeggse

Copy link
Copy Markdown
ContributorAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.httpIssues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@skeggse@brendanashworth@silverwind@thefourtheye