-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Update https.md #36370
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -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. | ||||||||
|
||||||||
|
@@ -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 | ||||||||
upload a file with a POST request, then write to the `ClientRequest` object. | ||||||||
|
||||||||
Comment on lines
+292
to
+295
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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': |
||||||||
```js | ||||||||
const https = require('https'); | ||||||||
|
||||||||
|
@@ -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 | ||||||||
|
There was a problem hiding this comment.
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 ofone
, that would be fine: