-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support HTTP/2 (httpie-http2 plugin doesn't work) #692
Comments
I just tried to go through installation of the The request to update Perhaps this issue should be rephrased to "implement support for HTTP/2". At this moment it is simply impossible to use HTTP/2 in any way via |
@jakubroztocil Any thoughts? http2 plugin has lots of problems and it seems like nobody is maintaining that repo |
bump @jakubroztocil |
@jakubroztocil hitting this up again as I had a need to test http/2 from a CLI but had to fall back to |
same issue i guess curl will always be better its been more than year. |
I’d also love to have built-in HTTP2 support. The httpie/httpie-http2 plugin is built on top python-hyper/hyper. That is the only HTTP2 solution for psf/requests I’m aware of and, sadly, it doesn’t seem to be actively maintained any longer. I’m keeping an eye on encode/httpx. It comes with a built-in HTTP2 support and might become a replacement for requests at some point. In any case, I’ll start by trying to fix the plugin. If successful, then I’ll look into bundling it with HTTPie. The general plugin installation issues will be addressed as well. |
Yeah, hyper is basically unmaintained: it got superseded by hyper-h2 and the associated other building blocks, and simply stopped being the most important thing. Httpx is definitely the thing to keep an eye on. |
I'd like to pick this up again - I'm planning on releasing I think the approach in #972 is the smart route to take - continue using I would probably suggest that the cautious approach would (at least to start with) be to only enable HTTP/2 support when explicitly requested(?) Ie. have an One other fiddly bits:
> https www.http11onlyserver.com --http2
GET / HTTP/2 # <--- Prints as if an HTTP/2 request was sent.
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: www.http11onlyserver.com
User-Agent: HTTPie/2.6.0
HTTP/1.1 200 OK # <--- But actually the connection ended up on HTTP/1.1
Age: 500630
Cache-Control: max-age=604800
Content-Encoding: gzip
Content-Length: 648
Content-Type: text/html; charset=UTF-8
Date: Thu, 16 Dec 2021 10:32:28 GMT
Etag: "3147526947+gzip"
Expires: Thu, 23 Dec 2021 10:32:28 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECS (nyb/1D04)
Vary: Accept-Encoding
X-Cache: HIT That can only be resolved by using some hooks to (Although if you did ever go down that route there's some useful information you'd be able to start exposing from Anyways - any thoughts? Does this seem like a reasonable approach? |
It's 2022 now, HTTP/3 is an industry standard… |
the httpie/httpie-http2 plugin is just broken, does not work at all for anything, have to uninstall: $ httpie --verbose https://h2book.com
GET / HTTP/1.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
User-Agent: HTTPie/3.1.0
Host: h2book.com
__main__.py: error: TypeError: sequence item 0: expected str instance, bytes found |
@tomchristie, just as a heads-up: |
@earwin - Sure. I'm not doing any work on HTTP/2 in For now you can use |
It's 2018 now, HTTP/2 is widely used, but
httpie
still doesn't support it out of the box. Let's fix this.I know about httpie/httpie-http2, but there are issues with this approach:
httpie/httpie-http2
doesn't come out of the box whenhttpie
gets installed, many people would just never know that this plugin even exists.curl
supports HTTP/2 out of the box.I see many benefits of supporting HTTP/2 natively. What are the downsides?
The text was updated successfully, but these errors were encountered: