HTTP/2 Connections
HTTP/2 connections multiplex multiple request-response pairs over a single TCP connection using streams. Each stream has a unique ID and can be independently managed. powhttp captures detailed information about HTTP/2 frames and stream events, which is essential for debugging performance issues, understanding flow control and analyzing multiplexing behavior.
List HTTP/2 Stream IDs
Retrieves all stream IDs that exist within a specific HTTP/2 connection. This gives you an overview of all the streams that were multiplexed on the connection.
GET /http2/{connection_id}Path Parameters:
connection_id: The ULID of the HTTP/2 connection, which can be found in thehttp2.connectionIdfield of an entry
Response:
Array<number>Returns an array of stream ID numbers. Stream IDs are always odd numbers for client-initiated streams and even numbers for server-initiated streams.
Example Response:
[0, 1, 3, 5, 7, 9]Get HTTP/2 Stream Details
Retrieves detailed frame-level information for a specific stream within an HTTP/2 connection. This provides visibility into all HTTP/2 frames exchanged for that stream, including headers, data, window updates and control frames.
GET /http2/{connection_id}/streams/{stream_id}Path Parameters:
connection_id: The ULID of the HTTP/2 connectionstream_id: The numeric ID of the stream within the connection
Response:
Returns an array of HTTP/2 events representing individual frames and state changes. The structure and available fields depend on the specific frame types that were exchanged. Events may include information about:
HEADERSframes containing HTTP request and response headersDATAframes carrying the request and response bodiesWINDOW_UPDATEframes for flow controlRST_STREAMframes indicating stream terminationPRIORITYframes for stream prioritizationSETTINGSand other connection-level frames
Example Request:
GET /http2/01K88WZ6TG8F1WVS5EEADR1KH7/streams/1Finding Connection Information
HTTP/2 connection information is available in entry objects returned from the entries endpoints. Look for the http2 field in an entry response. This field is only present for HTTP/2 entries and contains both the connection ID and the stream ID.
{
"id": "01K88WZ6TMNGMRB5JVZSHPSETA",
"url": "https://example.powhttp.com/post",
"http2": {
"connectionId": "01K88WZ6TG8F1WVS5EEADR1KH7", <- here
"streamId": 1
},
...
}Understanding Multiplexing
Multiple entries will share the same HTTP/2 connection ID when they were sent over the same TCP connection. By examining all streams in a connection, you can see how requests were multiplexed, understand priority relationships and analyze the performance impact of connection sharing. This is particularly valuable for optimizing web application performance and understanding browser connection management strategies.