module https
Supported only in the v8 engine. Introduced in Max v9.2.0.
The https module exposed by require("https"). Mirrors http over TLS, defaulting to https: URLs.
This is a minimal https subset, not full Node parity.
Index
Properties
Functions
function createServer
Creates a TLS-backed HTTP/1.1 server. options.key and options.cert are required PEM strings or buffer.IOBuffer values.
function createServer(
options: { key: string | buffer.IOBuffer; cert: string | buffer.IOBuffer },
requestListener?: http.RequestListener,
): http.Server;
| Name | Type | Description |
|---|---|---|
| options | object | options.key string | buffer.IOBuffer options.cert string | buffer.IOBuffer |
| optional requestListener | http.RequestListener | |
| Return Value | http.Server |
function get
Starts an HTTPS client GET request, calling end() automatically.
function get(
optionsOrUrl: string | { href: string } | http.RequestOptions,
callback?: (res: http.ClientResponse) => void,
): http.ClientRequest;
| Name | Type | Description |
|---|---|---|
| optionsOrUrl | string | { href: string } | http.RequestOptions | |
| optional callback | (res: http.ClientResponse) => void | |
| Return Value | http.ClientRequest |
globalAgenthttp.Agent
The shared default agent for HTTPS requests.
globalAgent: http.Agent
function request
Starts an HTTPS client request.
function request(
optionsOrUrl: string | { href: string } | http.RequestOptions,
callback?: (res: http.ClientResponse) => void,
): http.ClientRequest;
| Name | Type | Description |
|---|---|---|
| optionsOrUrl | string | { href: string } | http.RequestOptions | |
| optional callback | (res: http.ClientResponse) => void | |
| Return Value | http.ClientRequest |