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

Update https.md #36370

Merged
merged 1 commit into from Dec 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/https.md
Expand Up @@ -275,6 +275,7 @@ changes:
* `port` **Default:** `443`
* `agent` **Default:** `https.globalAgent`
* `callback` {Function}
* Returns: {http.ClientRequest}

Makes a request to a secure web server.

Expand All @@ -288,6 +289,10 @@ The following additional `options` from [`tls.connect()`][] are also accepted:
string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][]
object, it will be automatically converted to an ordinary `options` object.

`https.request()` returns an instance of the [`http.ClientRequest`][]
class. The `ClientRequest` instance is a writable stream. If one needs to
Copy link
Member

Choose a reason for hiding this comment

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

Pronouns are OK in our docs, so if you want to use you instead of one, that would be fine:

Suggested change
class. The `ClientRequest` instance is a writable stream. If one needs to
class. The `ClientRequest` instance is a writable stream. If you need to

upload a file with a POST request, then write to the `ClientRequest` object.

Comment on lines +292 to +295
Copy link
Member

Choose a reason for hiding this comment

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

Do we need any of this information in the text if it's been added to line 278 above? Maybe the paragraph can go but the other addition can stay?

Suggested change
`https.request()` returns an instance of the [`http.ClientRequest`][]
class. The `ClientRequest` instance is a writable stream. If one needs to
upload a file with a POST request, then write to the `ClientRequest` object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This paragraph was copied from http.request, includes the use of 'one'. All I did was add a single letter 's' to 'http':

https://github.com/nodejs/node/blob/master/doc/api/http.md#httprequesturl-options-callback

```js
const https = require('https');

Expand Down Expand Up @@ -458,6 +463,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
[`URL`]: url.md#url_the_whatwg_url_api
[`http.Agent(options)`]: http.md#http_new_agent_options
[`http.Agent`]: http.md#http_class_http_agent
[`http.ClientRequest`]: http.md#http_class_http_clientrequest
[`http.Server#headersTimeout`]: http.md#http_server_headerstimeout
[`http.Server#keepAliveTimeout`]: http.md#http_server_keepalivetimeout
[`http.Server#maxHeadersCount`]: http.md#http_server_maxheaderscount
Expand Down