go - Can httptest be used to test HTTP/2? -


i'm wondering if this (httptest) package can used test http/2 specific features.
can point me examples maybe?

i'm aware of tool h2i, it's interactive tool.
i'm looking programmable.

edit:
i'm looking tool, example can initiate server push , test on client side.
so, using package, how have access underlying http/2 stuff uses default?

edit 2:
found examples in nghttp2 source: https://github.com/tatsuhiro-t/nghttp2/tree/master/integration-tests

edit 3: me looks package net/http2 isn't meant used directly anyone. i'll experiment this one.

https://github.com/summerwind/h2spec go program tests whether server implementation conforms rfc 7540. allows craft individual http/2 frames such as:

    settings := http2.setting{http2.settinginitialwindowsize, 0}     http2conn.fr.writesettings(settings) 

or

    var hp http2.headersframeparam     hp.streamid = 1     hp.endstream = false     hp.endheaders = true     hp.blockfragment = http2conn.encodeheader(hdrs)     http2conn.fr.writeheaders(hp) 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -