node:http2
The built-in Node.js module for HTTP/2 servers and clients, built on the nghttp2 library.
In more detail
Its core API hands you each request as a stream event with its headers; stream.respond() sends the response headers. A compatibility API mimics node:http so existing handlers can run over HTTP/2.
Related terms
- HTTP/2 — A version of HTTP that sends the same methods, statuses and headers in a binary format and runs many requests at once over one connection.
- nghttp2 — An open-source C library implementing the HTTP/2 protocol, used inside Node.js and many other programs.
- HTTP/2 session — In Node.js, the object representing one HTTP/2 connection between a client and a server, which carries all its streams.
Taught in
- Native HTTP/2 Protocols: Multiplexed Streams & Push — Node.js Internals & Backend Services