HTTPS

Options for making an HTTPS request.

Module: node:https Support: Experimental Since: 1.1.0 Docs: Node.js Docs

5 members: 3 supported, 2 undocumented

Static Methods

🟢 createServer(options, requestListener)
Creates and returns a new HTTPS Server (TLS-wrapped HTTP server).
⚪ request(options, callback)
If true, prefer the server's cipher order.
🟢 get(options, callback)
Convenience method that issues a GET request and calls end() automatically.

Properties

🟢 globalAgent
— The global HTTPS agent used for connection pooling.
⚪ maxHeaderSize
Maximum allowed HTTP header size in bytes.

Dictionary HttpsServerOptions

Options for creating an HTTPS server (extends TLS + HTTP server options).

Since: 1.1.0 Docs: Node.js Docs

15 members: 15 undocumented

Properties

⚪ insecureHTTPParser
Allow non-standard HTTP parsing (relaxed header validation).
⚪ maxHeaderSize
Maximum allowed HTTP header size in bytes.
⚪ joinDuplicateHeaders
If true, duplicate header fields are joined with a comma.
⚪ ca
Trusted CA certificate(s) (PEM string, Buffer, or array).
⚪ cert
Server certificate chain (PEM string or Buffer).
⚪ key
Server certificate chain (PEM string or Buffer).
⚪ passphrase
Passphrase to decrypt the private key.
⚪ pfx
PFX/PKCS#12 encoded private key and certificate chain.
⚪ ciphers
OpenSSL cipher suite string.
⚪ honorCipherOrder
If true, prefer the server's cipher order.
⚪ requestCert
If true, request client certificates (mTLS).
⚪ rejectUnauthorized
If true, reject clients with invalid or missing certificates.
⚪ minVersion
Minimum TLS version (e.g. "TLSv1.2").
⚪ maxVersion
Maximum TLS version.
⚪ ALPNProtocols
List of ALPN protocol names in preference order.

---

Dictionary HttpsRequestOptions

Options for making an HTTPS request.

Since: 1.1.0 Docs: Node.js Docs

17 members: 17 undocumented

Properties

⚪ protocol
Maximum TLS version.
⚪ hostname
Protocol string (e.g. "https:").
⚪ host
Alias for hostname.
⚪ port
Alias for hostname.
⚪ path
Remote port (default: 443).
⚪ method
Request path including query string.
⚪ headers
HTTP method (default: "GET").
⚪ agent
HTTPS Agent to use.
⚪ ca
Trusted CA certificate(s) (PEM string, Buffer, or array).
⚪ cert
Server certificate chain (PEM string or Buffer).
⚪ key
Server certificate chain (PEM string or Buffer).
⚪ passphrase
Passphrase to decrypt the private key.
⚪ rejectUnauthorized
If true, reject clients with invalid or missing certificates.
⚪ servername
Server name for SNI TLS extension.
⚪ minVersion
Minimum TLS version (e.g. "TLSv1.2").
⚪ maxVersion
Maximum TLS version.
⚪ ciphers
OpenSSL cipher suite string.

---

Interface HttpsAgent

HTTPS Agent — manages connection persistence and reuse for HTTPS clients.

Since: 1.1.0 Docs: Node.js Docs

Methods

🟢 destroy()
Destroys any sockets currently in use by the agent.

Properties

🟢 maxSockets
— Maximum number of sockets to keep open per origin.
🟢 maxFreeSockets
— Maximum number of free (idle) sockets to keep per origin.
🟢 maxTotalSockets
— Maximum total number of sockets across all origins.
🟢 timeout
— Maximum total number of sockets across all origins.

---