{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.0.json","id":"https","path":"/https","type":"module","module":"https","title":"HTTPS","introducedIn":"v0.10.0","sourceLink":{"path":"lib/https.js","url":"https://github.com/nodejs/node/blob/HEAD/lib/https.js"},"stability":{"index":"2","description":"Stable"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a\nseparate module.","summary":"HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.","examples":[],"children":[{"kind":"section","id":"determining-if-crypto-support-is-unavailable","name":"Determining if crypto support is unavailable","title":"Determining if crypto support is unavailable","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"It is possible for Node.js to be built without including support for the\n`node:crypto` module. In such cases, attempting to `import` from `https` or\ncalling `require('node:https')` will result in an error being thrown.\n\nWhen using CommonJS, the error thrown can be caught using try/catch:\n\n```cjs\nlet https;\ntry {\n  https = require('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}\n```\n\nWhen using the lexical ESM `import` keyword, the error can only be\ncaught if a handler for `process.on('uncaughtException')` is registered\n*before* any attempt to load the module is made (using, for instance,\na preload module).\n\nWhen using ESM, if there is a chance that the code may be run on a build\nof Node.js where crypto support is not enabled, consider using the\n[`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) function instead of the lexical `import` keyword:\n\n```mjs\nlet https;\ntry {\n  https = await import('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}\n```","summary":"It is possible for Node.js to be built without including support for the `node:crypto` module. In such cases, attempting to `import` from `https` or calling `require('node:https')` will result in an error being thrown.","examples":[{"language":"cjs","displayName":null,"code":"let https;\ntry {\n  https = require('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}"},{"language":"mjs","displayName":null,"code":"let https;\ntry {\n  https = await import('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}"}],"children":[]},{"kind":"class","id":"class-httpsagent","name":"Agent","title":"Class: `https.Agent`","scope":"module","overloadOf":null,"stability":null,"added":["v0.4.5"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v5.3.0"],"prUrl":"https://github.com/nodejs/node/pull/4252","commit":null,"description":"support `0` `maxCachedSessions` to disable TLS session caching."},{"versions":["v2.5.0"],"prUrl":"https://github.com/nodejs/node/pull/2228","commit":null,"description":"parameter `maxCachedSessions` added to `options` for TLS sessions reuse."}],"extends":null,"description":"An [`Agent`](#class-httpsagent) object for HTTPS similar to [`http.Agent`](http.html#class-httpagent). See\n[`https.request()`](#httpsrequestoptions-callback) for more information.\n\nLike `http.Agent`, the `createConnection(options[, callback])` method can be overridden\nto customize how TLS connections are established.\n\n> See [`agent.createConnection()`](http.html#agentcreateconnectionoptions-callback) for details on overriding this method,\n> including asynchronous socket creation with a callback.","summary":"An `Agent` object for HTTPS similar to `http.Agent`. See `https.request()` for more information.","examples":[],"children":[{"kind":"constructor","id":"new-agentoptions","name":"Agent","title":"`new Agent([options])`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.5.0","v22.21.0"],"prUrl":"https://github.com/nodejs/node/pull/58980","commit":null,"description":"Add support for `proxyEnv`."},{"versions":["v24.5.0","v22.21.0"],"prUrl":"https://github.com/nodejs/node/pull/58980","commit":null,"description":"Add support for `defaultPort` and `protocol`."},{"versions":["v12.5.0"],"prUrl":"https://github.com/nodejs/node/pull/28209","commit":null,"description":"do not automatically set servername if the target host was specified using an IP address."}],"signature":{"parameters":[{"name":"options","type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":"Set of configurable options to set on the agent.\nCan have the same fields as for [`http.Agent(options)`](http.html#new-agentoptions), and","default":null,"optional":true,"rest":false,"properties":[{"name":"maxCachedSessions","type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"description":"maximum number of TLS cached sessions.\nUse `0` to disable TLS session caching.","default":"100","optional":true,"rest":false,"properties":[]},{"name":"servername","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"the value of\n[Server Name Indication extension](https://en.wikipedia.org/wiki/Server_Name_Indication) to be sent to the server. Use\nempty string `''` to disable sending the extension.\n\nSee [`Session Resumption`](tls.html#session-resumption) for information about TLS session reuse.","default":"host name of the target server, unless the target server is specified using an IP address, in which case the default is `''` (no extension)","optional":true,"rest":false,"properties":[]}]}],"returns":null},"description":"Requests that specify a custom `checkServerIdentity` option are not eligible\nfor connection reuse or TLS session reuse by an `https.Agent`, unless the\n`checkServerIdentity` option was specified when constructing the Agent.","summary":"Requests that specify a custom `checkServerIdentity` option are not eligible for connection reuse or TLS session reuse by an `https.Agent`, unless the `checkServerIdentity` option was specified when constructing the Agent.","examples":[],"children":[{"kind":"event","id":"event-keylog","name":"keylog","title":"Event: `'keylog'`","scope":"module","overloadOf":null,"stability":null,"added":["v13.2.0","v12.16.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"parameters":[{"name":"line","type":{"text":"Buffer","links":[{"name":"Buffer","href":"buffer.html#class-buffer","start":0,"end":6}]},"description":"Line of ASCII text, in NSS `SSLKEYLOGFILE` format.","default":null,"optional":false,"rest":false,"properties":[]},{"name":"tlsSocket","type":{"text":"tls.TLSSocket","links":[{"name":"tls.TLSSocket","href":"tls.html#tlstlssocket","start":0,"end":13}]},"description":"The `tls.TLSSocket` instance on which it was\ngenerated.","default":null,"optional":false,"rest":false,"properties":[]}],"description":"The `keylog` event is emitted when key material is generated or received by a\nconnection managed by this agent (typically before handshake has completed, but\nnot necessarily). This keying material can be stored for debugging, as it\nallows captured TLS traffic to be decrypted. It may be emitted multiple times\nfor each socket.\n\nA typical use case is to append received lines to a common text file, which is\nlater used by software (such as Wireshark) to decrypt the traffic:\n\n```js\n// ...\nhttps.globalAgent.on('keylog', (line, tlsSocket) => {\n  fs.appendFileSync('/tmp/ssl-keys.log', line, { mode: 0o600 });\n});\n```","summary":"The `keylog` event is emitted when key material is generated or received by a connection managed by this agent (typically before handshake has completed, but not necessarily). This keying material can be stored for debugging, as it allows captured TLS traffic to be decrypted. It may be emitted multiple times for each socket.","examples":[{"language":"js","displayName":null,"code":"// ...\nhttps.globalAgent.on('keylog', (line, tlsSocket) => {\n  fs.appendFileSync('/tmp/ssl-keys.log', line, { mode: 0o600 });\n});"}],"children":[]}]}]},{"kind":"class","id":"class-httpsserver","name":"Server","title":"Class: `https.Server`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.4"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"extends":{"text":"tls.Server","links":[{"name":"tls.Server","href":"tls.html#class-tlsserver","start":0,"end":10}]},"description":"See [`http.Server`](http.html#class-httpserver) for more information.","summary":"See `http.Server` for more information.","examples":[],"children":[{"kind":"method","id":"serverclosecallback","name":"close","title":"`server.close([callback])`","scope":"module","overloadOf":null,"stability":null,"added":["v0.1.90"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"callback","type":{"text":"Function","links":[{"name":"Function","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function","start":0,"end":8}]},"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"https.Server","links":[{"name":"https.Server","href":"https.html#class-httpsserver","start":0,"end":12}]},"description":""}},"description":"See [`server.close()`](http.html#serverclosecallback) in the `node:http` module.","summary":"See `server.close()` in the `node:http` module.","examples":[],"children":[]},{"kind":"method","id":"serversymbolasyncdispose","name":"[Symbol.asyncDispose]","title":"`server[Symbol.asyncDispose]()`","scope":"module","overloadOf":null,"stability":null,"added":["v20.4.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v24.2.0"],"prUrl":"https://github.com/nodejs/node/pull/58467","commit":null,"description":"No longer experimental."}],"signature":{"parameters":[],"returns":null},"description":"Calls [`server.close()`](#serverclosecallback) and returns a promise that\nfulfills when the server has closed.","summary":"Calls `server.close()` and returns a promise that fulfills when the server has closed.","examples":[],"children":[]},{"kind":"method","id":"servercloseallconnections","name":"closeAllConnections","title":"`server.closeAllConnections()`","scope":"module","overloadOf":null,"stability":null,"added":["v18.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":null},"description":"See [`server.closeAllConnections()`](http.html#servercloseallconnections) in the `node:http` module.","summary":"See `server.closeAllConnections()` in the `node:http` module.","examples":[],"children":[]},{"kind":"method","id":"servercloseidleconnections","name":"closeIdleConnections","title":"`server.closeIdleConnections()`","scope":"module","overloadOf":null,"stability":null,"added":["v18.2.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":null},"description":"See [`server.closeIdleConnections()`](http.html#servercloseidleconnections) in the `node:http` module.","summary":"See `server.closeIdleConnections()` in the `node:http` module.","examples":[],"children":[]},{"kind":"property","id":"serverheaderstimeout","name":"headersTimeout","title":"`server.headersTimeout`","scope":"module","overloadOf":null,"stability":null,"added":["v11.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":"60000","description":"See [`server.headersTimeout`](http.html#serverheaderstimeout) in the `node:http` module.","summary":"See `server.headersTimeout` in the `node:http` module.","examples":[],"children":[]},{"kind":"method","id":"serverlisten","name":"listen","title":"`server.listen()`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":null},"description":"Starts the HTTPS server listening for encrypted connections.\nThis method is identical to [`server.listen()`](net.html#serverlisten) from [`net.Server`](net.html#class-netserver).","summary":"Starts the HTTPS server listening for encrypted connections. This method is identical to `server.listen()` from `net.Server`.","examples":[],"children":[]},{"kind":"property","id":"servermaxheaderscount","name":"maxHeadersCount","title":"`server.maxHeadersCount`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":"2000","description":"See [`server.maxHeadersCount`](http.html#servermaxheaderscount) in the `node:http` module.","summary":"See `server.maxHeadersCount` in the `node:http` module.","examples":[],"children":[]},{"kind":"property","id":"serverrequesttimeout","name":"requestTimeout","title":"`server.requestTimeout`","scope":"module","overloadOf":null,"stability":null,"added":["v14.11.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v18.0.0"],"prUrl":"https://github.com/nodejs/node/pull/41263","commit":null,"description":"The default request timeout changed from no timeout to 300s (5 minutes)."}],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":"300000","description":"See [`server.requestTimeout`](http.html#serverrequesttimeout) in the `node:http` module.","summary":"See `server.requestTimeout` in the `node:http` module.","examples":[],"children":[]},{"kind":"method","id":"serversettimeoutmsecs-callback","name":"setTimeout","title":"`server.setTimeout([msecs][, callback])`","scope":"module","overloadOf":null,"stability":null,"added":["v0.11.2"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"msecs","type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"description":"","default":"`120000` (2 minutes)","optional":true,"rest":false,"properties":[]},{"name":"callback","type":{"text":"Function","links":[{"name":"Function","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function","start":0,"end":8}]},"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"https.Server","links":[{"name":"https.Server","href":"https.html#class-httpsserver","start":0,"end":12}]},"description":""}},"description":"See [`server.setTimeout()`](http.html#serversettimeoutmsecs-callback) in the `node:http` module.","summary":"See `server.setTimeout()` in the `node:http` module.","examples":[],"children":[]},{"kind":"property","id":"servertimeout","name":"timeout","title":"`server.timeout`","scope":"module","overloadOf":null,"stability":null,"added":["v0.11.2"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v13.0.0"],"prUrl":"https://github.com/nodejs/node/pull/27558","commit":null,"description":"The default timeout changed from 120s to 0 (no timeout)."}],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":"0 (no timeout)","description":"See [`server.timeout`](http.html#servertimeout) in the `node:http` module.","summary":"See `server.timeout` in the `node:http` module.","examples":[],"children":[]},{"kind":"property","id":"serverkeepalivetimeout","name":"keepAliveTimeout","title":"`server.keepAliveTimeout`","scope":"module","overloadOf":null,"stability":null,"added":["v8.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"number","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"default":"`5000` (5 seconds)","description":"See [`server.keepAliveTimeout`](http.html#serverkeepalivetimeout) in the `node:http` module.","summary":"See `server.keepAliveTimeout` in the `node:http` module.","examples":[],"children":[]}]},{"kind":"method","id":"httpscreateserveroptions-requestlistener","name":"createServer","title":"`https.createServer([options][, requestListener])`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.4"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"options","type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":"Accepts `options` from [`tls.createServer()`](tls.html#tlscreateserveroptions-secureconnectionlistener),\n[`tls.createSecureContext()`](tls.html#tlscreatesecurecontextoptions) and [`http.createServer()`](http.html#httpcreateserveroptions-requestlistener).","default":null,"optional":true,"rest":false,"properties":[]},{"name":"requestListener","type":{"text":"Function","links":[{"name":"Function","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function","start":0,"end":8}]},"description":"A listener to be added to the `'request'` event.","default":null,"optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"https.Server","links":[{"name":"https.Server","href":"https.html#class-httpsserver","start":0,"end":12}]},"description":""}},"description":"```mjs\n// curl -k https://localhost:8000/\nimport { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  key: readFileSync('private-key.pem'),\n  cert: readFileSync('certificate.pem'),\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n```\n\n```cjs\n// curl -k https://localhost:8000/\nconst https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n```\n\nOr\n\n```mjs\nimport { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  pfx: readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n```\n\n```cjs\nconst https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  pfx: fs.readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n```\n\nTo generate the certificate and key for this example, run:\n\n```bash\nopenssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \\\n  -keyout private-key.pem -out certificate.pem\n```\n\nThen, to generate the `pfx` certificate for this example, run:\n\n```bash\nopenssl pkcs12 -certpbe AES-256-CBC -export -out test_cert.pfx \\\n  -inkey private-key.pem -in certificate.pem -passout pass:sample\n```","summary":"Or","examples":[{"language":"mjs","displayName":null,"code":"// curl -k https://localhost:8000/\nimport { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  key: readFileSync('private-key.pem'),\n  cert: readFileSync('certificate.pem'),\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);"},{"language":"cjs","displayName":null,"code":"// curl -k https://localhost:8000/\nconst https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);"},{"language":"mjs","displayName":null,"code":"import { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  pfx: readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);"},{"language":"cjs","displayName":null,"code":"const https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  pfx: fs.readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);"},{"language":"bash","displayName":null,"code":"openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \\\n  -keyout private-key.pem -out certificate.pem"},{"language":"bash","displayName":null,"code":"openssl pkcs12 -certpbe AES-256-CBC -export -out test_cert.pfx \\\n  -inkey private-key.pem -in certificate.pem -passout pass:sample"}],"children":[]},{"kind":"method","id":"httpsgetoptions-callback","name":"get","title":"`https.get(options[, callback])`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"options","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"callback","type":null,"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":null},"description":"","summary":"","examples":[],"children":[]},{"kind":"method","id":"httpsgeturl-options-callback","name":"get","title":"`https.get(url[, options][, callback])`","scope":"module","overloadOf":"httpsgetoptions-callback","stability":null,"added":["v0.3.6"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v10.9.0"],"prUrl":"https://github.com/nodejs/node/pull/21616","commit":null,"description":"The `url` parameter can now be passed along with a separate `options` object."},{"versions":["v7.5.0"],"prUrl":"https://github.com/nodejs/node/pull/10638","commit":null,"description":"The `options` parameter can be a WHATWG `URL` object."}],"signature":{"parameters":[{"name":"url","type":{"text":"string | URL","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"URL","href":"url.html#the-whatwg-url-api","start":9,"end":12}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"options","type":{"text":"Object | string | URL","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6},{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":9,"end":15},{"name":"URL","href":"url.html#the-whatwg-url-api","start":18,"end":21}]},"description":"Accepts the same `options` as\n[`https.request()`](#httpsrequestoptions-callback), with the method set to GET by default.","default":null,"optional":true,"rest":false,"properties":[]},{"name":"callback","type":{"text":"Function","links":[{"name":"Function","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function","start":0,"end":8}]},"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"http.ClientRequest","links":[{"name":"http.ClientRequest","href":"http.html#class-httpclientrequest","start":0,"end":18}]},"description":""}},"description":"Like [`http.get()`](http.html#httpgetoptions-callback) but for HTTPS.\n\n`options` can be an object, a string, or a [`URL`](url.html#the-whatwg-url-api) object. If `options` is a\nstring, it is automatically parsed with [`new URL()`](url.html#new-urlinput-base). If it is a [`URL`](url.html#the-whatwg-url-api)\nobject, it will be automatically converted to an ordinary `options` object.\n\n```mjs\nimport { get } from 'node:https';\nimport process from 'node:process';\n\nget('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});\n```\n\n```cjs\nconst https = require('node:https');\n\nhttps.get('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});\n```","summary":"Like `http.get()` but for HTTPS.","examples":[{"language":"mjs","displayName":null,"code":"import { get } from 'node:https';\nimport process from 'node:process';\n\nget('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});"},{"language":"cjs","displayName":null,"code":"const https = require('node:https');\n\nhttps.get('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});"}],"children":[]},{"kind":"property","id":"httpsglobalagent","name":"globalAgent","title":"`https.globalAgent`","scope":"module","overloadOf":null,"stability":null,"added":["v0.5.9"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v19.0.0"],"prUrl":"https://github.com/nodejs/node/pull/43522","commit":null,"description":"The agent now uses HTTP Keep-Alive and a 5 second timeout by default."}],"type":null,"default":null,"description":"Global instance of [`https.Agent`](#class-httpsagent) for all HTTPS client requests. Diverges\nfrom a default [`https.Agent`](#class-httpsagent) configuration by having `keepAlive` enabled and\na `timeout` of 5 seconds.","summary":"Global instance of `https.Agent` for all HTTPS client requests. Diverges from a default `https.Agent` configuration by having `keepAlive` enabled and a `timeout` of 5 seconds.","examples":[],"children":[]},{"kind":"method","id":"httpsrequestoptions-callback","name":"request","title":"`https.request(options[, callback])`","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"options","type":null,"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"callback","type":null,"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":null},"description":"","summary":"","examples":[],"children":[]},{"kind":"method","id":"httpsrequesturl-options-callback","name":"request","title":"`https.request(url[, options][, callback])`","scope":"module","overloadOf":"httpsrequestoptions-callback","stability":null,"added":["v0.3.6"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v22.4.0","v20.16.0"],"prUrl":"https://github.com/nodejs/node/pull/53329","commit":null,"description":"The `clientCertEngine` option depends on custom engine support in OpenSSL which is deprecated in OpenSSL 3."},{"versions":["v16.7.0","v14.18.0"],"prUrl":"https://github.com/nodejs/node/pull/39310","commit":null,"description":"When using a `URL` object parsed username and password will now be properly URI decoded."},{"versions":["v14.1.0","v13.14.0"],"prUrl":"https://github.com/nodejs/node/pull/32786","commit":null,"description":"The `highWaterMark` option is accepted now."},{"versions":["v10.9.0"],"prUrl":"https://github.com/nodejs/node/pull/21616","commit":null,"description":"The `url` parameter can now be passed along with a separate `options` object."},{"versions":["v9.3.0"],"prUrl":"https://github.com/nodejs/node/pull/14903","commit":null,"description":"The `options` parameter can now include `clientCertEngine`."},{"versions":["v7.5.0"],"prUrl":"https://github.com/nodejs/node/pull/10638","commit":null,"description":"The `options` parameter can be a WHATWG `URL` object."}],"signature":{"parameters":[{"name":"url","type":{"text":"string | URL","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6},{"name":"URL","href":"url.html#the-whatwg-url-api","start":9,"end":12}]},"description":"","default":null,"optional":false,"rest":false,"properties":[]},{"name":"options","type":{"text":"Object | string | URL","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6},{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":9,"end":15},{"name":"URL","href":"url.html#the-whatwg-url-api","start":18,"end":21}]},"description":"Accepts all `options` from\n[`http.request()`](http.html#httprequestoptions-callback), with some differences in default values:","default":null,"optional":true,"rest":false,"properties":[{"name":"protocol","type":null,"description":"","default":"'https:'","optional":true,"rest":false,"properties":[]},{"name":"port","type":null,"description":"","default":"443","optional":true,"rest":false,"properties":[]},{"name":"agent","type":null,"description":"","default":"https.globalAgent","optional":true,"rest":false,"properties":[]}]},{"name":"callback","type":{"text":"Function","links":[{"name":"Function","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function","start":0,"end":8}]},"description":"","default":null,"optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"http.ClientRequest","links":[{"name":"http.ClientRequest","href":"http.html#class-httpclientrequest","start":0,"end":18}]},"description":""}},"description":"Makes a request to a secure web server.\n\nThe following additional `options` from [`tls.connect()`](tls.html#tlsconnectoptions-callback) are also accepted:\n`ca`, `cert`, `ciphers`, `clientCertEngine` (deprecated), `crl`, `dhparam`, `ecdhCurve`,\n`honorCipherOrder`, `key`, `passphrase`, `pfx`, `rejectUnauthorized`,\n`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,\n`highWaterMark`.\n\n`options` can be an object, a string, or a [`URL`](url.html#the-whatwg-url-api) object. If `options` is a\nstring, it is automatically parsed with [`new URL()`](url.html#new-urlinput-base). If it is a [`URL`](url.html#the-whatwg-url-api)\nobject, it will be automatically converted to an ordinary `options` object.\n\n`https.request()` returns an instance of the [`http.ClientRequest`](http.html#class-httpclientrequest)\nclass. The `ClientRequest` instance is a writable stream. If one needs to\nupload a file with a POST request, then write to the `ClientRequest` object.\n\n```mjs\nimport { request } from 'node:https';\nimport process from 'node:process';\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();\n```\n\n```cjs\nconst https = require('node:https');\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = https.request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();\n```\n\nExample using options from [`tls.connect()`](tls.html#tlsconnectoptions-callback):\n\n```js\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\noptions.agent = new https.Agent(options);\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n```\n\nAlternatively, opt out of connection pooling by not using an [`Agent`](#class-httpsagent).\n\n```js\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n  agent: false,\n};\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n```\n\nExample using a [`URL`](url.html#the-whatwg-url-api) as `options`:\n\n```js\nconst options = new URL('https://abc:xyz@example.com');\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n```\n\nExample pinning on certificate fingerprint, or the public key (similar to\n`pin-sha256`):\n\n```mjs\nimport { checkServerIdentity } from 'node:tls';\nimport { Agent, request } from 'node:https';\nimport { createHash } from 'node:crypto';\n\nfunction sha256(s) {\n  return createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    let lastprint256;\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      const hash = createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new Agent(options);\nconst req = request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();\n```\n\n```cjs\nconst tls = require('node:tls');\nconst https = require('node:https');\nconst crypto = require('node:crypto');\n\nfunction sha256(s) {\n  return crypto.createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = tls.checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      hash = crypto.createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new https.Agent(options);\nconst req = https.request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();\n```\n\nOutputs for example:\n\n```text\nSubject Common Name: github.com\n  Certificate SHA256 fingerprint: FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65\n  Public key ping-sha256: SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=\nSubject Common Name: Sectigo ECC Domain Validation Secure Server CA\n  Certificate SHA256 fingerprint: 61:E9:73:75:E9:F6:DA:98:2F:F5:C1:9E:2F:94:E6:6C:4E:35:B6:83:7C:E3:B9:14:D2:24:5C:7F:5F:65:82:5F\n  Public key ping-sha256: Eep0p/AsSa9lFUH6KT2UY+9s1Z8v7voAPkQ4fGknZ2g=\nSubject Common Name: USERTrust ECC Certification Authority\n  Certificate SHA256 fingerprint: A6:CF:64:DB:B4:C8:D5:FD:19:CE:48:89:60:68:DB:03:B5:33:A8:D1:33:6C:62:56:A8:7D:00:CB:B3:DE:F3:EA\n  Public key ping-sha256: UJM2FOhG9aTNY0Pg4hgqjNzZ/lQBiMGRxPD5Y2/e0bw=\nSubject Common Name: AAA Certificate Services\n  Certificate SHA256 fingerprint: D7:A7:A0:FB:5D:7E:27:31:D7:71:E9:48:4E:BC:DE:F7:1D:5F:0C:3E:0A:29:48:78:2B:C8:3E:E0:EA:69:9E:F4\n  Public key ping-sha256: vRU+17BDT2iGsXvOi76E7TQMcTLXAqj0+jGPdW7L1vM=\nAll OK. Server matched our pinned cert or public key\nstatusCode: 200\n```","summary":"Makes a request to a secure web server.","examples":[{"language":"mjs","displayName":null,"code":"import { request } from 'node:https';\nimport process from 'node:process';\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();"},{"language":"cjs","displayName":null,"code":"const https = require('node:https');\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = https.request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();"},{"language":"js","displayName":null,"code":"const options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\noptions.agent = new https.Agent(options);\n\nconst req = https.request(options, (res) => {\n  // ...\n});"},{"language":"js","displayName":null,"code":"const options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n  agent: false,\n};\n\nconst req = https.request(options, (res) => {\n  // ...\n});"},{"language":"js","displayName":null,"code":"const options = new URL('https://abc:xyz@example.com');\n\nconst req = https.request(options, (res) => {\n  // ...\n});"},{"language":"mjs","displayName":null,"code":"import { checkServerIdentity } from 'node:tls';\nimport { Agent, request } from 'node:https';\nimport { createHash } from 'node:crypto';\n\nfunction sha256(s) {\n  return createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    let lastprint256;\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      const hash = createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new Agent(options);\nconst req = request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();"},{"language":"cjs","displayName":null,"code":"const tls = require('node:tls');\nconst https = require('node:https');\nconst crypto = require('node:crypto');\n\nfunction sha256(s) {\n  return crypto.createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = tls.checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      hash = crypto.createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new https.Agent(options);\nconst req = https.request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();"},{"language":"text","displayName":null,"code":"Subject Common Name: github.com\n  Certificate SHA256 fingerprint: FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65\n  Public key ping-sha256: SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=\nSubject Common Name: Sectigo ECC Domain Validation Secure Server CA\n  Certificate SHA256 fingerprint: 61:E9:73:75:E9:F6:DA:98:2F:F5:C1:9E:2F:94:E6:6C:4E:35:B6:83:7C:E3:B9:14:D2:24:5C:7F:5F:65:82:5F\n  Public key ping-sha256: Eep0p/AsSa9lFUH6KT2UY+9s1Z8v7voAPkQ4fGknZ2g=\nSubject Common Name: USERTrust ECC Certification Authority\n  Certificate SHA256 fingerprint: A6:CF:64:DB:B4:C8:D5:FD:19:CE:48:89:60:68:DB:03:B5:33:A8:D1:33:6C:62:56:A8:7D:00:CB:B3:DE:F3:EA\n  Public key ping-sha256: UJM2FOhG9aTNY0Pg4hgqjNzZ/lQBiMGRxPD5Y2/e0bw=\nSubject Common Name: AAA Certificate Services\n  Certificate SHA256 fingerprint: D7:A7:A0:FB:5D:7E:27:31:D7:71:E9:48:4E:BC:DE:F7:1D:5F:0C:3E:0A:29:48:78:2B:C8:3E:E0:EA:69:9E:F4\n  Public key ping-sha256: vRU+17BDT2iGsXvOi76E7TQMcTLXAqj0+jGPdW7L1vM=\nAll OK. Server matched our pinned cert or public key\nstatusCode: 200"}],"children":[]}]}