Support HTTP/2 (httpie-http2 plugin doesn't work)
See original GitHub issueIt’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.- Linux distributions do not provide a package for that plugin.
- People have issues installing the plugin on macOS: https://github.com/jakubroztocil/httpie/issues/298#issuecomment-273360856.
- The entire code of httpie/httpie-http2 is just 20 lines (7 useful lines), integration will be trivial.
- Even
curl
supports HTTP/2 out of the box.
I see many benefits of supporting HTTP/2 natively. What are the downsides?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:66
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Support HTTP/2 (httpie-http2 plugin doesn't work) #692 - GitHub
httpie /httpie-http2 doesn't come out of the box when httpie gets installed, many people would just never know that this plugin even exists....
Read more >HTTPie 3.2.1 (latest) docs
HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible.
Read more >HTTP/2 Frequently Asked Questions
Yes, mostly. For HTTP/2 over TLS ( h2 ), if you do not implement the http1. 1 ALPN identifier, then you will not...
Read more >HTTP/2 support for HTTPie
Install HTTP/2 support on HTTPie. 2. Install the HTTP/2 plugin for HTTPie: Open a Terminal window and type the command below:
Read more >HTTP/2 doesn't work? - General - Cloudflare Community
Currently Google bot does yet support HTTP/2. ... for desktop report and mobile report using Lighthouse plugin for Google Chrome (latest) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s 2022 now, HTTP/3 is an industry standard…
I’d like to pick this up again - I’m planning on releasing
httpx
/httpcore
1.0 this month, and after that getting HTTP/2 support forhttpie
is right up there on my list. Becausehttpie
has a super large install base it’s going to be really important to minimise any risk of unintended changes in the network behaviour, even for edge cases etc.I think the approach in #972 is the smart route to take - continue using
requests
, but switch the underlying adapter tohttpcore
in order to support HTTP/2. I’ll have another look at reissuing a pull request for that oncehttpcore
1.0 is released.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
--http2
flag, and only switch to httpcore in that case. The benefit of this is that all existing behaviour will stay the same, which just means a much lower risk factor for any changes.One other fiddly bits:
--http2
should imply--default-scheme=https
. Or perhaps error unless it’s used with thehttps
command? (Because HTTP/2 is normally HTTPS-only)That can only be resolved by using some hooks to
httpcore
that provide detailed callbacks, and printing the request once the connection is actually established. But that’d require a much bigger change tohttpie
, and doesn’t seem worth the complexity for a first-pass.(Although if you did ever go down that route there’s some useful information you’d be able to start exposing from
httpie
, but that’s a whole different conversation.)Anyways - any thoughts? Does this seem like a reasonable approach?