node:https

#Import

import https from "nstdlib/node/https";

Note

The API is available, but not everything works. The http client over TLS: no OpenSSL, so internalBinding('crypto') cannot make a secure context unless a host fills the node_binding_crypto_secure_context_dispatch and node_binding_tls_wrap_dispatch hooks. native/ does, and https.request()/https.get() then run against a real server. https.createServer() is tls.createServer() underneath and still throws, because every session that half opens is a client.

#Support

node:https. nstd: works; Node test suite 0% passing. Browser: not tested; export coverage 100%; Node test suite 0% passing.

  • nstd: Gives the same output as Node.js in side-by-side tests: tls.
  • Browser: Loads with a minimal process object. 6 of Node's 6 exports are available. No behavior check covers it yet.

#Exports (6)

Every name Node.js exports from this module, and what you get when you read it, as a named import or as a property of the default import:

  • ✅ A value, both ways. An export that throws an error naming the missing feature also counts.
  • ⚠️ A value one way, undefined the other.
  • ❔ undefined both ways.
  • ❌ Not exported at all.
  • – Not measured.
ExportNode.jsBrowser
Agent✅✅
Server✅✅
createServer✅✅
get✅✅
globalAgent✅✅
request✅✅

#Diagnostics

nstdlib running inside Node.js. This isn't an environment it's meant for, so it isn't shown above, but it tells a library problem from an environment one:

  • coverage: 6/6 of the host's export names answer inside host node. API only. The http client over TLS: no OpenSSL, so internalBinding('crypto') cannot make a secure context unless a host fills the node_binding_crypto_secure_context_dispatch and node_binding_tls_wrap_dispatch hooks. native/ does, and https.request()/https.get() then run against a real server. https.createServer() is tls.createServer() underneath and still throws, because every session that half opens is a client.
  • smoke: Imports in a clean child process.
  • node-suite: 2/66 of Node's own eligible tests pass with ./dist inside host node. A failure there and in the page is the library's, one only in the page is the engine's.