Skip to content
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

Document why this project exists #83

Closed
mwgamble opened this issue Mar 2, 2021 · 2 comments
Closed

Document why this project exists #83

mwgamble opened this issue Mar 2, 2021 · 2 comments

Comments

@mwgamble
Copy link

mwgamble commented Mar 2, 2021

It would be great to add a note to the readme to explain why this project exists and why someone might want to choose it over HTTPie. This could also include any points where xh deliberately differs from HTTPie in behaviour/syntax.

Even if the answer is "because I felt like making it" (which is a perfectly valid reason!), I still think it would be valuable to have it written down.

@blyxxyz
Copy link
Collaborator

blyxxyz commented Mar 3, 2021

It would be good to have this in the README, yeah.

My reason for using it is its speed. HTTPie unfortunately has a long startup time, enough to be annoying. xh can be 10+ times as fast on requests to localhost, or even 50+ times if you disable coloring (which is weirdly expensive).

Other advantages over HTTPie:

Downsides:

  • It doesn't have all of HTTPie's features.
  • You can't disable HTTP/2 (Allow forcing HTTP version #68), and large downloads over HTTP/2 perform badly (Downloading is slow #49). (A solution has been merged in reqwest so we can fix the download speed after its next release.)
  • It may never have anything like HTTPie's plugin system.
  • General immaturity. HTTPie has seen a lot of real-world usage, that's hard to beat.
  • Worse documentation. HTTPie's docs are very impressive, and you can even try out commands right on the webpage using termible. (Maybe we could do that by compiling to WebAssembly?)

Differences:

  • Headers are sent and printed in lowercase (because of the libraries used).

I can't think of any (important) deliberate incompatibilities with HTTPie. There are a few edge cases it handles differently, but they should only come up rarely.

@ducaale
Copy link
Owner

ducaale commented Mar 3, 2021

One more advantage xh has over HTTPie is that it uses rustls instead of the system's installed TLS library.

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

3 participants