Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

http.h2

import http

http exposes this as http.h2, so import http is enough and the names are called as http.h2.*. import http.h2 reaches the same definitions directly.

HTTP/2 (RFC 9113) and the header compression it uses (RFC 7541).

HttpServer speaks this automatically: over TLS when ALPN negotiates h2, and over cleartext when a client opens with the HTTP/2 connection preface. HttpClient uses it when a server negotiates h2 for an HTTPS connection.

The pieces are here for anything that needs them directly - a gateway, a test harness, or a protocol that borrows HPACK.

Submodules

ModuleReached asSummary
http.h2.connectionhttp.h2.connection.*One HTTP/2 connection and the streams multiplexed over it.
http.h2.frameshttp.h2.frames.*The HTTP/2 frame layer (RFC 9113 §4 and §6): a nine-octet header - a 24-bit length, a type, a flags byte, and…
http.h2.hpackhttp.h2.hpack.*HPACK, the header compression HTTP/2 uses (RFC 7541).
http.h2.huffmanhttp.h2.huffman.*The static Huffman code HPACK uses to compress header field names and values, from RFC 7541 Appendix B.

2026, Richard Ore and Zuri contributors