Node.js v12.8.0 Documentation


HTTPS#

Stability: 2 - Stable

HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.

Class: https.Agent[src]#

An Agent object for HTTPS similar to http.Agent. See https.request() for more information.

new Agent([options])#

  • options <Object> Set of configurable options to set on the agent. Can have the same fields as for http.Agent(options), and

    • maxCachedSessions <number> maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100.

    • servername <string> the value of Server Name Indication extension to be sent to the server. Use empty string '' to disable sending the extension. Default: hostname of the target server, unless the target server is specified using an IP address, in which case the default is '' (no extension).

      See Session Resumption for infomation about TLS session reuse.

Class: https.Server[src]#

This class is a subclass of tls.Server and emits events same as http.Server. See http.Server for more information.

server.close([callback])[src]#

See server.close() from the HTTP module for details.

server.headersTimeout#

See http.Server#headersTimeout.

server.listen()[src]#

Starts the HTTPS server listening for encrypted connections. This method is identical to server.listen() from