Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

doc: clarify http.request language #8990

Closed
wants to merge 1 commit into from
Closed

doc: clarify http.request language #8990

wants to merge 1 commit into from

Conversation

skeggse
Copy link

@skeggse skeggse commented Jan 7, 2015

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 http.request documentation doesn't clearly specify the significance
of some of its options fields, `host` and `hostname`.

Signed-off-by: Eli Skeggs <skeggse@gmail.com>
@jasnell
Copy link
Member

jasnell commented Aug 14, 2015

@cjihrig @chrisdickinson ... not convinced this one is necessary. Inclined to close but wanted to check with you first.

@skeggse
Copy link
Author

skeggse commented Aug 14, 2015

Just to expand on this, 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.

@jasnell
Copy link
Member

jasnell commented Aug 14, 2015

@skeggse ... yeah, the description in general should be improved. Tell you what... can you close this here and open this as a new PR against http://github.com/nodejs/node master? Active development is moving there and I'd like to get others to weigh in on the change.

@cjihrig
Copy link

cjihrig commented Aug 15, 2015

I'm in favor of improving the documentation here. I also agree that we should move this over to nodejs/node. Going to close here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants