node:http

#Import

import http from "nstdlib/http";

Note

Only the API surface is available. Client requests work wherever the host backs the socket bridge. native/ does. The parser is this tree's own and needs no host. http.Server needs listen(), which no host backs yet.

#Runtime support

Where it runsStatusExport coverageDetails
nstd✅ worksNative tests match Node.js: http-parser, fetch.
Browser⚠️ some support95% of Node.jsIt imports with the small process shim. 20/21 Node.js exports are available. No module-specific behavior test ran.
Node.js (host)⚠️ some support95% of Node.js20/21 exports.

#Exports (20 of 21)

Each cell shows what happens when code reads an export:

  • ✅ Available through every import style. A named error also counts.
  • ⚠️ Available through only some import styles.
  • ❔ The export exists but has no value.
  • ❌ The export does not exist.
  • – This environment was not measured.
ExportNode.jsnstdlibbrowser
Agent
ClientRequest
CloseEvent
IncomingMessage
METHODS
MessageEvent
OutgoingMessage
STATUS_CODES
Server
ServerResponse
WebSocket
_connectionListener
createServer
get
globalAgent
maxHeaderSize
request
setGlobalProxyFromEnv
setMaxIdleHTTPParsers
validateHeaderName
validateHeaderValue

#Missing exports (1)

These exports exist in Node.js but not in nstdlib:

  • WebSocket (undefined)