Skip to content

meta: add unified http api initiative - #65139

Open
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/unified-http-initiative
Open

meta: add unified http api initiative#65139
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/unified-http-initiative

Conversation

@jasnell

@jasnell jasnell commented Aug 8, 2026

Copy link
Copy Markdown
Member

HTTP APIs in Node.js have become a bit of a mess.

We have separate node:http, node:https, and node:http2 modules. We have separate fetch implementation. We have http3 support in development. There are new http features like datagrams and priorities that are entirely unsupported, etc.

This strategic initiative will be focused on the development of a unified HTTP API built around the web standard fetch model. Client and Server.. independent of underlying transport and updated to modern HTTP protocol capabilities.

@nodejs/quic @mcollina @nodejs/tsc

HTTP APIs in Node.js have become a bit of a mess.

We have separate `node:http`, `node:https`, and `node:http2`
modules. We have separate `fetch` implementation. We have
`http3` support in development. There are new http features
like datagrams and priorities that are entirely unsupported,
etc.

This strategic initiative will be focused on the development
of a unified HTTP API built around the web standard fetch
model. Client and Server.. independent of underlying transport
and updated to modern HTTP protocol capabilities.

Signed-off-by: James M Snell <jasnell@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Aug 8, 2026
@jasnell jasnell added http Issues or PRs related to the http subsystem. net Issues and PRs related to the net subsystem. meta Issues and PRs related to the general management of the project. http2 Issues or PRs related to the http2 subsystem. quic Issues and PRs related to the QUIC implementation / HTTP/3. fetch Issues and PRs related to the Fetch API web-standards Issues and PRs related to Web APIs http3 webtransport and removed doc Issues and PRs related to the documentations. labels Aug 8, 2026
@jasnell
jasnell requested a review from a team August 8, 2026 15:13

@panva panva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign me up.

@jonchurch

jonchurch commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Stoked to see this as a strategic initiative!

(I know this is early early days, but curious if anyone wants to share what's in their head or in discussions I've missed)

One clarifying question on "built around the web standard fetch model":

Should I read that as Node standardizing the future of request handlers on Request/Response primitives? Or am I looking at the wrong layer here and the end goal is an abstraction layer sitting below Fetch/IncomingMessage, speaking historic protocols as well as future ones? Or is it both: that abstraction layer underneath, with Request/Response handlers standardized on top of it?

Either way, would the top level Request/Response layer be extended to compensate for the things the Fetch spec makes hard for servers to model today? Or would it stay pure Fetch spec, with those server concerns discussed at the WHATWG level?

For context on why I'm asking: I was expecting a unified HTTP API to address the shortcomings the Fetch spec has for modeling jobs that servers need to do. I see the Fetch spec serving browsers as its main constituents, and the tension that can create for servers wanting to model all the jobs they must do via Fetch primitives. So that phrase surprised me, and I'm mostly trying to align my mental model with what layer this new API would occupy relative to the existing stuff. Not opposed to any direction here, just want to clear the fog in my understanding of what problems are on the table.

In the spirit of intellectual honesty, my initial (mistaken) read

I often fall into the trap of categorizing Fetch as a protocol. I know it's not, but my brain often forgets that. I work on Express after all, where we have extended and intertwined with node:http to the point that Fetch looks like a different protocol to me, despite being a different API over the same protocols.

So my initial reaction was that a unified HTTP API would sit above Fetch/IncomingMessage and translate between them at the protocol level. But an implementation competing for the layer Fetch occupies sounds like the xkcd "14 competing standards becomes 15" trap, so I'm assuming that's not on the table hehe

You can see some more of my raw thoughts in this express thread from before I posted this question

@bjohansebas

Copy link
Copy Markdown
Member

By the way, as far as I know, there are things that probably will never make it into the Fetch standard, but those things that don't belong in the Fetch spec could still be added as a standard variation within the WinterTC group. That way, both frameworks and runtimes can have a minimal API that runtimes are expected to support.

@jasnell

jasnell commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Either way, would the top level Request/Response layer be extended to compensate for the things the Fetch spec makes hard for servers to model today? Or would it stay pure Fetch spec, with those server concerns discussed at the WHATWG level?

The answer is likely some mixture of both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetch Issues and PRs related to the Fetch API http Issues or PRs related to the http subsystem. http2 Issues or PRs related to the http2 subsystem. http3 meta Issues and PRs related to the general management of the project. net Issues and PRs related to the net subsystem. quic Issues and PRs related to the QUIC implementation / HTTP/3. web-standards Issues and PRs related to Web APIs webtransport

Projects

None yet

Development

Successfully merging this pull request may close these issues.