feat(ext/node): wire llhttp-based ClientRequest into http.ts
Replace the hyper-ops-based ClientRequest with the ported Node.js
_http_client.js ClientRequest. HTTP requests now flow through:
JS socket.write() -> TCP -> server
server response -> TCP -> socket 'data' -> llhttp parser -> IncomingMessage
Key changes:
- http.ts: import ClientRequest from _http_client.js, remove old
~890-line hyper-based ClientRequest class
- _http_outgoing.ts: rewrite _send()/_writeRaw() to match Node.js
(write directly to socket instead of TransformStream)
- _http_outgoing.ts: implement end() (was stubbed with notImplemented)
- _http_outgoing.ts: add JS-side chunked encoding framing in write_()
- _http_outgoing.ts: fix _storeHeader to append headers to string
directly instead of calling setHeader() (which was too late)
- http_parser.ts: fix kOnBody wrapper to preserve `this` context
Verified working: GET, POST with chunked body, response parsing,
status codes, body streaming.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>