3 **h2i** is an interactive HTTP/2 ("h2") console debugger. Miss the good ol'
4 days of telnetting to your HTTP/1.n servers? We're bringing you
8 - send raw HTTP/2 frames
13 - type in HTTP/1.n and have it auto-HPACK/frame-ify it for HTTP/2
14 - pretty print all received HTTP/2 frames from the peer (including HPACK decoding)
15 - tab completion of commands, options
17 Not yet features, but soon:
18 - unnecessary CONTINUATION frames on short boundaries, to test peer implementations
19 - request bodies (DATA frames)
20 - send invalid frames for testing server implementations (supported by underlying Framer)
28 $ go get golang.org/x/net/http2/h2i
39 Whether to skip TLS cert validation
41 Comma-separated list of NPN/ALPN protocol names to negotiate. (default "h2,h2-14")
44 Connecting to google.com:443 ...
45 Connected to 74.125.224.41:443
46 Negotiated protocol "h2-14"
47 [FrameHeader SETTINGS len=18]
48 [MAX_CONCURRENT_STREAMS = 100]
49 [INITIAL_WINDOW_SIZE = 1048576]
50 [MAX_FRAME_SIZE = 16384]
51 [FrameHeader WINDOW_UPDATE len=4]
52 Window-Increment = 983041
55 [FrameHeader PING flags=ACK len=8]
58 (as HTTP/1.1)> GET / HTTP/1.1
59 (as HTTP/1.1)> Host: ip.appspot.com
60 (as HTTP/1.1)> User-Agent: h2i/brad-n-blake
63 :authority = ip.appspot.com
67 user-agent = h2i/brad-n-blake
68 [FrameHeader HEADERS flags=END_HEADERS stream=1 len=77]
70 alternate-protocol = "443:quic,p=1"
72 content-type = "text/html"
73 date = "Fri, 01 May 2015 23:06:56 GMT"
74 server = "Google Frontend"
75 [FrameHeader DATA flags=END_STREAM stream=1 len=15]
77 [FrameHeader PING len=8]
78 Data = "\x00\x00\x00\x00\x00\x00\x00\x00"
80 [FrameHeader PING flags=ACK len=8]
83 [FrameHeader PING flags=ACK len=8]
86 [FrameHeader GOAWAY len=22]
87 Last-Stream-ID = 1; Error-Code = PROTOCOL_ERROR (1)
94 Quick few hour hack. So much yet to do. Feel free to file issues for
95 bugs or wishlist items, but [@bmizerany](https://github.com/bmizerany/)
96 and I aren't yet accepting pull requests until things settle down.