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

7.7.3 Release Proposal #11831

Merged
merged 32 commits into from
Mar 14, 2017
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c5874d1
url: remove invalid file protocol check
mscdex Mar 5, 2017
5e7baa5
tools: add links to the stability index reference
michaelcox Mar 2, 2017
1e52ba3
test: limit lint rule disabling in message test
Trott Mar 6, 2017
1af0fa4
test: test buffer behavior when zeroFill undefined
Trott Mar 6, 2017
a98d963
test: increase coverage of console
DavidCai1111 Mar 2, 2017
3d55cf0
test: add more WHATWG URL origin tests
mscdex Mar 5, 2017
4477e15
test: add regex in test_cyclic_link_protection
clarenced Feb 19, 2017
c01c7a4
test: add script to create 0-dns-cert.pem
shigeki Feb 27, 2017
aaf8536
test: add test for loading from global folders
richardlau Oct 20, 2016
1da2afc
src: drop the NODE_ISOLATE_SLOT macro
addaleax Mar 5, 2017
032becd
src: add missing #include <unicode/ustring.h>
srl295 Mar 8, 2017
52f0092
s390: enable march=z196
Mar 7, 2017
1dff218
net: allow missing callback for Socket.connect
vhain Mar 9, 2017
1034587
module: fix loading from global folders on Windows
richardlau Oct 25, 2016
9c3cf13
doc: argument types for https methods
ameliavoncat Mar 3, 2017
108449b
doc: add Franziska Hinkelmann to the CTC
rvagg Feb 22, 2017
517c3af
doc: fix process links to console.log/error
sam-github Mar 6, 2017
5bea8b4
doc: fix occurences of "the the"
JeroenMandersloot Mar 6, 2017
8a1b2b4
doc: reduce font size on smaller screens
gibfahn Mar 5, 2017
2fcefee
dgram: refactor dgram to module.exports
claudiorodriguez Mar 5, 2017
612bd68
doc: consistent case for primitive types
silverwind Feb 4, 2017
97d1f5f
doc: linkify type[] syntax, support lowercase for primitives
silverwind Feb 14, 2017
5a9e30f
tools: fix lint issue in doctool
silverwind Mar 2, 2017
757bf48
doc/tools: fix more type inconsistencies
silverwind Mar 5, 2017
734ddbe
test: fix flaky test-http-set-timeout-server
santigimeno Mar 10, 2017
a20aa0e
doc: http cleanup and missing argument types
ameliavoncat Mar 3, 2017
188cbc6
doc: package main can be directory with an index
bmeck Feb 27, 2017
6cc7b30
doc: improve child_process `maxBuffer` text
Trott Mar 10, 2017
b543fd4
doc: update to current V8 versions
fhinkel Mar 10, 2017
dd3e6ad
doc: add missing changelog heading for 7.7.2
evanlucas Mar 13, 2017
542a373
build: add node_use_openssl check to install.py
danbev Mar 9, 2017
9c68a69
2017-03-14, Version 7.7.3 (Current)
italoacasas Mar 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: argument types for https methods
Ref: #9399
PR-URL: #11681
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
ameliavoncat authored and italoacasas committed Mar 13, 2017
commit 9c3cf13cbc262fda7ae3c6843e3db22cbb79f08b
100 changes: 37 additions & 63 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,29 @@ added: v0.3.4
This class is a subclass of `tls.Server` and emits events same as
[`http.Server`][]. See [`http.Server`][] for more information.

### server.setTimeout(msecs, callback)
### server.setTimeout([msecs][, callback])
<!-- YAML
added: v0.11.2
-->
- `msecs` {number} Defaults to 120000 (2 minutes).
- `callback` {Function}

See [`http.Server#setTimeout()`][].

### server.timeout
### server.timeout([msecs])
<!-- YAML
added: v0.11.2
-->
- `msecs` {number} Defaults to 120000 (2 minutes).

See [`http.Server#timeout`][].

## https.createServer(options[, requestListener])
<!-- YAML
added: v0.3.4
-->

Returns a new HTTPS web server object. The `options` is similar to
[`tls.createServer()`][]. The `requestListener` is a function which is
automatically added to the `'request'` event.
- `options` {Object} Accepts `options` from [`tls.createServer()`][] and [`tls.createSecureContext()`][].
- `requestListener` {Function} A listener to be added to the `request` event.

Example:

Expand Down Expand Up @@ -82,19 +83,33 @@ https.createServer(options, (req, res) => {
<!-- YAML
added: v0.1.90
-->
- `callback` {Function}

See [`http.close()`][] for details.

### server.listen(handle[, callback])
- `handle` {Object}
- `callback` {Function}

### server.listen(path[, callback])
### server.listen(port[, host][, backlog][, callback])
- `path` {string}
- `callback` {Function}

### server.listen([port][, host][, backlog][, callback])
- `port` {number}
- `hostname` {string}
- `backlog` {number}
- `callback` {Function}

See [`http.listen()`][] for details.

## https.get(options, callback)
## https.get(options[, callback])
<!-- YAML
added: v0.3.6
-->
- `options` {Object | string} Accepts the same `options` as
[`https.request()`][], with the `method` always set to `GET`.
- `callback` {Function}

Like [`http.get()`][] but for HTTPS.

Expand Down Expand Up @@ -126,18 +141,27 @@ added: v0.5.9

Global instance of [`https.Agent`][] for all HTTPS client requests.

## https.request(options, callback)
## https.request(options[, callback])
<!-- YAML
added: v0.3.6
-->
- `options` {Object | string} Accepts all `options` from [`http.request()`][],
with some differences in default values:
- `protocol` Defaults to `https:`
- `port` Defaults to `443`.
- `agent` Defaults to `https.globalAgent`.
- `callback` {Function}


Makes a request to a secure web server.

The following additional `options` from [`tls.connect()`][] are also accepted when using a
custom [`Agent`][]:
`pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`, `secureProtocol`, `servername`

`options` can be an object or a string. If `options` is a string, it is
automatically parsed with [`url.parse()`][].

All options from [`http.request()`][] are valid.

Example:

```js
Expand All @@ -164,58 +188,7 @@ req.on('error', (e) => {
});
req.end();
```

The options argument has the following options

- `host`: A domain name or IP address of the server to issue the request to.
Defaults to `'localhost'`.
- `hostname`: Alias for `host`. To support `url.parse()` `hostname` is
preferred over `host`.
- `family`: IP address family to use when resolving `host` and `hostname`.
Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be
used.
- `port`: Port of remote server. Defaults to 443.
- `localAddress`: Local interface to bind for network connections.
- `socketPath`: Unix Domain Socket (use one of host:port or socketPath).
- `method`: A string specifying the HTTP request method. Defaults to `'GET'`.
- `path`: Request path. Defaults to `'/'`. Should include query string if any.
E.G. `'/index.html?page=12'`. An exception is thrown when the request path
contains illegal characters. Currently, only spaces are rejected but that
may change in the future.
- `headers`: An object containing request headers.
- `auth`: Basic authentication i.e. `'user:password'` to compute an
Authorization header.
- `agent`: Controls [`Agent`][] behavior. When an Agent is used request will
default to `Connection: keep-alive`. Possible values:
- `undefined` (default): use [`globalAgent`][] for this host and port.
- `Agent` object: explicitly use the passed in `Agent`.
- `false`: opts out of connection pooling with an Agent, defaults request to
`Connection: close`.

The following options from [`tls.connect()`][] can also be specified:

- `pfx`: Certificate, Private key and CA certificates to use for SSL. Default `null`.
- `key`: Private key to use for SSL. Default `null`.
- `passphrase`: A string of passphrase for the private key or pfx. Default `null`.
- `cert`: Public x509 certificate to use. Default `null`.
- `ca`: A string, [`Buffer`][] or array of strings or [`Buffer`][]s of trusted
certificates in PEM format. If this is omitted several well known "root"
CAs will be used, like VeriSign. These are used to authorize connections.
- `ciphers`: A string describing the ciphers to use or exclude. Consult
<https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT> for
details on the format.
- `rejectUnauthorized`: If `true`, the server certificate is verified against
the list of supplied CAs. An `'error'` event is emitted if verification
fails. Verification happens at the connection level, *before* the HTTP
request is sent. Default `true`.
- `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force
SSL version 3. The possible values depend on your installation of
OpenSSL and are defined in the constant [`SSL_METHODS`][].
- `servername`: Servername for SNI (Server Name Indication) TLS extension.

In order to specify these options, use a custom [`Agent`][].

Example:
Example using options from [`tls.connect()`][]:

```js
var options = {
Expand Down Expand Up @@ -269,4 +242,5 @@ var req = https.request(options, (res) => {
[`SSL_METHODS`]: https://www.openssl.org/docs/man1.0.2/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS
[`tls.connect()`]: tls.html#tls_tls_connect_options_callback
[`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options
[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost