Is HTTP/2 supported in Typhoeus

495 views Asked by At

I cannot find any information about support HTTP/2 features in Typhoeus gem. Is this fully compatible or not?

1

There are 1 answers

0
Paulo Fidalgo On BEST ANSWER

Yes, it's supported, according to https://github.com/typhoeus/typhoeus/issues/628#issuecomment-496976697 you can create an HTTP2 request with:

response = Typhoeus.get("https://nghttp2.org", http_version: :httpv2_0, verbose: true)

and you can check the HTTP version with: response.http_version => "2"

Remember that Typhoeus use libcurl and it has support for HTTP/2, but the underlying cUrl version needs to have support compiled in, so you use an old version, your results may vary.