8000 Does Typhoeus support HTTP/2 · Issue #690 · typhoeus/typhoeus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Does Typhoeus support HTTP/2 #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cschull opened this issue Feb 1, 2022 · 3 comments
Open

Does Typhoeus support HTTP/2 #690

cschull opened this issue Feb 1, 2022 · 3 comments

Comments

@cschull
Copy link
cschull commented Feb 1, 2022

Hi,

I have some large assets I need to download (>2GB) with Typhoeus, but the downloads consistently fail using HTTP/1.1 and I've only gotten them to work with HTTP/2. Does Typhoeus support HTTP/2 and if so, how would I implement that?

@mmizutani
Copy link
mmizutani commented Feb 14, 2022

Yes. Pass an http_version: :httpv2_0 option to Typhoeus::Request.new.
https://github.com/typhoeus/ethon/blob/453c6f0ba37a7d42978c90f2399f5c2cd66b32a6/lib/ethon/curls/options.rb#L355

> Typhoeus::Request.new("https://www.google.com", verbose: true, http_version: :httpv2_0).run
  Trying 172.217.175.68:443...

Connected to www.google.com (172.217.175.68) port 443 (#2)
...
Using HTTP2, server supports multi-use

@semaperepelitsa
Copy link

It should use HTTP/2 by default where available, same as curl.

> Typhoeus::Request.new("https://www.google.com", verbose: true).run

  Trying 142.250.178.4:443...
Connected to www.google.com (142.250.178.4) port 443 (#1)
...
Using HTTP2, server supports multiplexing

@jeremyhaile
Copy link

How do you multiplex requests? Does Hydra automatically multiplex requests when using an HTTP/2 server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0