I'm wondering if this (httptest) package can be used to test HTTP/2 specific features.
Can anyone point me to some examples maybe?
I'm aware of the tool h2i, but it's an interactive tool.
I'm looking for something which is programmable.
EDIT:
What I'm really looking for is a tool, where for example I can initiate a server push and test it on the client side.
So, using this package, how do I have access to the underlying HTTP/2 stuff it uses by default?
EDIT 2:
Found some examples in the nghttp2 source:
https://github.com/tatsuhiro-t/nghttp2/tree/master/integration-tests
EDIT 3: For me it looks like that the package net/http2 isn't meant to be used directly by anyone. I'll experiment with this one.
Google Chrome offers a quick and easy way to check if HTTP/2 is supported on your SSL-enabled site. First, visit your site in Chrome over HTTPS. There you'll see your site listed with protocol h2, confirming your site works over HTTP/2.
So, most browsers has done its part and you might need to check and upgrade your server. Head over to one of your favourite site > dev tools > network tab > right click and enable the protocol tab and see which protocol version is being used. I picked a sample from facebook and they use HTTP/2.
Don't use Fiddler to test it, it gets in between your browser and the server and breaks the HTTP2 connection.
No HTTP2 - no push.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With