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
- nstd: Gives the same output as Node.js in side-by-side tests: tls.
- Browser: Loads with a minimal
processobject. 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,
undefinedthe other. - ❔
undefinedboth ways. - ❌ Not exported at all.
- – Not measured.
| Export | Node.js | Browser |
|---|---|---|
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. Thehttpclient over TLS: no OpenSSL, sointernalBinding('crypto')cannot make a secure context unless a host fills thenode_binding_crypto_secure_context_dispatchandnode_binding_tls_wrap_dispatchhooks.native/does, andhttps.request()/https.get()then run against a real server.https.createServer()istls.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.