4 ms·
Curl is alright, and congratulations on this massive and very impressive step forwards, but the CLI not exactly very user friendly. httpie[1] is a great tool if
by orf 9y ago
Curl is alright, and congratulations on this massive and very impressive step forwards, but the CLI not exactly very user friendly. httpie[1] is a great tool if you find curl invocation somewhat arcane.
1. https://httpie.org/ https://httpie.org/
- unkoman 9y agocurl is much more than http.
- Something1234 9y agoHTTPie is great, but sometimes you need curl. Curl supports a lot more protocols.
- chrisper 9y agoYes, but MS seems to disable many of them.
- Rapzid 9y agoPlus, it's easy to forget that httpie is SLOW. Sometimes when testing an API the timings are worrying, until you remember and switch over to cURL to confirm everything is right with the world.
- nicolaslem 9y agoI don't know why you are getting downvoted. That's true, starting a Python interpreter is a relatively expensive operation. There is a noticeable lag with most CLIs written in Python. There has been some work recently to make the interpreter start faster. I hope we will see the result in Python 3.7.
- andrew_mason1 9y agocurl may not have the greatest CLI, but it's a huge step up from doing the equivalent tasks with powershell. not to mention this brings windows closer and closer to nix. windows making itself more familiar to nix increases the number of ops folks that are willing to transition from nix shops to windows, increasing windows share in the server market plus, as others have pointed out, curl handles protocols besides http.
- snug 9y agoYea but can you export a httpie command from the browser?
- orf 9y agoNo, and that's a real shame :(
- userbinator 9y agoThat seems like a tool designed for a very specific use-case (JSON APIs), rather than the general-purpose protocol interaction of cURL. The fact that it appears to be doing some things "behind your back" to be "helpful" like reordering headers or otherwise manipulating the data would certainly be unwanted in a general-purpose tool.
- petepete 9y agoTrue. But for those of us who work with JSON APIs more-often-than-not it's very good. Being able to simply pipe in a file as a payload saves me a lot of time. I know cURL does 1001 other things too, so the two tools aren't really in competition. HTTPie is more akin to Postman or Insomnia.
- user5994461 9y agoUse the "jq" command line tool to format json output. It's a life changer. curl 'https://raw.githubusercontent.com/LearnWebCode/json-example/master/pets-data.json' https://raw.githubusercontent.com/LearnWebCode/json-example/... | jq '.'
- JepZ 9y agoWell, I am not sure if I would call it arcane. There are only two things which I find a little non user friendly: 1. By default curl doesn't follow redirects and I think most use-cases (not all) require that behavior (at least from the cli). 2. Similar to wget, many users who start using curl do it to download something, probably a file. But opposite to wget curl doesn't write a file but to stdout. Actually, I find curls behavior much more UNIX style, but it is probably the first obstacle every user has to tackle. Nevertheless, in the end this makes curl easier to use, because you do not have to remember which parameter is used to set the output file name, but instead just use the universal unix operator '>'.