9 ms·
HTTPie is a command line HTTP client, a user-friendly cURL replacement
- todd3834 12y agoAt first I thought, what is so unfriendly about cURL? Then I saw the screenshot that shows a comparable cURL request behind the HTTPie request and I'm convinced.
- jabagonuts 12y agoThat was my first thought, too. Then I saw the colorized output and I'm convinced, too.
- laurent123456 12y agoIsn't the HTTpie command simpler because it uses defaults for the content type and charset? If Curl did the same (not sure why it should because not everything is JSON/UTF-8), the command would be about as short as the HTTPie one.
- stormbrew 12y agoThis is probably different for different people, but I find myself constantly looking up the right flag for controlling a part of a request with curl even though I use it a lot. Having the command line be smarter about interpreting which argument is which seems like a productivity gain to me.
- deleted 12y ago[deleted]
- barosl 12y agoDetermining the type of an argument by looking up the presence of ':', '=', or '==' is brilliant. I liked it. It can also be used to replace Wget, which not only breaks a multibyte filename sometimes, but also requires the --content-disposition option to handle the Content-Disposition header.
- halayli 12y agoI'd just wrap a simple program around curl to improve its argument passing complexity if that's your pain point but I wouldn't go on rewriting an HTTP client. Curl is a very mature code base by now and that's something to appreciate. It handles all the edge cases well and has dealt with all the mess that you'll discover over time.
- amjd 12y agoHttpie doesn't come close to Curl in terms of features. Its selling points are colourised output (using pygments) and (slightly) better json formatting. Here's an unobstructed side by side comparison for the same request: http://i.imgur.com/Bj2wRkq.png http://i.imgur.com/Bj2wRkq.png While it won't replace Curl, it can prove quite useful while testing APIs.
- jacquesm 12y agoWhy is the order of the headers different between those two examples?
- notdonspaulding 12y agoI haven't looked at any code, but I would strongly suspect that it's because either HTTPie or python-requests is using a plain dictionary instead of an ordered dictionary under the hood.
- jacquesm 12y agoThat would appear to be a bug to me. When you want to see the headers of such a transaction you want to see them in the order in which they left the server. I checked the server and it looks like CURL has it right. Colorizing is one thing, reordering is quite another, debugging tools should show the situation with as much fidelity as possible.
- diminoten 12y ago
- _nullandnull_ 12y agoPoor choice of name. All I can see is HTTP Internet Explorer.
- lukasm 12y agoInstead of curl I was usually writing https://github.com/kennethreitz/requests https://github.com/kennethreitz/requests
- paulannesley 12y agoThat's what httpie uses internally: https://github.com/jakubroztocil/httpie/blob/77955c9837259b1159e87d4a47bd67d47b1c7d6d/setup.py#L32 https://github.com/jakubroztocil/httpie/blob/77955c9837259b1...
- cobralibre 12y agoI seem to spend my every waking moment reporting defects for HTTP APIs. HTTPie's interface is far more intuitive than cURL's, and pretty-printed responses are a kindness not just for me but for the people who have to read the bug reports, too.
- mateuszf 12y agoI'm not sure about httpie but using curl with jq also gives nice formatted and coloured responses. curl ... | jq '.'
- acdha 12y agojq is awesome, particularly if you need to filter or otherwise process JSON, but the great part about httpie is that it works with just about everything so you don't have to remember a different filter chain for each type of content. It uses pygments which means you also get nested formatting for e.g. CSS or JavaScript inside an HTML document.
- mateuszf 12y agoAwesome, thanks!
- johns 12y agoYou could use our Share URLs which would let the people you share defects with reproduce them for themselves: https://www.runscope.com/docs/sharing https://www.runscope.com/docs/sharing
- aikah 12y agoSomehow I used to hate curl because I began using it through the PHP Curl extension,which has the most horrible API(no,the other API for HTTP requests in PHP is even worse, it creates adhoc variables,yes variables can appear like that in PHP which leads to "variable name collisison"... ). But with time,using it in the shell it happened to be quite powerfull for testing apis. HTTPie coloring is a plus,does it work with XML too?
- suprgeek 12y agoThis is one of the little known gems I recommend often. the readability difference is just amazing for me. On that note for those of us having to use Windows at the workplace there are a few things that make life easier: 1) Chocolatey (package manager) 2) HTTPie 3) ConEmu (Shell) 4) gow (Unix command line utilities in Windows) 5) WinMerge (win diff) 6) TortiseSVN 7) SourceTree (git) Makes day to day stuff much smoother....
- Fuzzwah 12y agoI've got a couple other utils I'd add to a list like this: - kitty (ssh client, fork of putty) - visualwget (wget gui) - dsynchronize (dir sync)
- wldcordeiro 12y agoAnother great SSH client is SmarTTY.
- jebblue 12y agoWhen I'm on Windows I use Cygwin ssh but for those who are more Windows aware, BitVise Tunnelier.
- mateuszf 12y agoAnother one - crossplatform http interception proxy like Fiddler - called mitmproxy. It has a great feature - it can transparently handle https traffic.
- 12y ago
- bdevine 12y agoThe sessions, the wget-like download mode, the binary detection, the upload capabilities... there is a lot to like here. I will definitely be checking this out. Thanks for posting!
- hernan604 12y agoHTTP::Tiny
- tomphoolery 12y agoBig fan of this one. HTTPie is a lovely replacement for cURL, especially when you just want to quickly test a JSON API.
- kernel_panic 12y agoThis is amazing! Will definitely be switching away from using curl. I put a the basic examples here to easily play with httpie http://runnable.com/U5wOrMxHLYsVkYbX/basic-httpie-examples-for-curl http://runnable.com/U5wOrMxHLYsVkYbX/basic-httpie-examples-f...
- aroch 12y agoD'oh! HTTPie doesn't support SNI
- _RPM 12y agoWhile I don't think it will EVER replace curl, it does seem like a fun piece of software to play around with. Great job!
- amrit_b 12y agoI use this tool on a regular basis and just love it. Thanks for building HTTPie :)
- hcarvalhoalves 12y agoNow if I could pipe the request from Sublime Text and get the results back in a buffer it would be awesome to deal with JSON. Any idea?
- deleted 12y ago[deleted]
- nroose 12y agoI will keep using wget.
- fibertera 12y agoTried it, works great! Nice work!!
- tilltheis 12y agoIs there any chance get this into Homebrew for an easier installation on Mac?
- tim333 12y agoI just installed it on my mac by doing $ sudo pip install httpie It was not too tricky
- tilltheis 12y agoSure, but i dislike installing other tools like pip just for a single tool.
- sethammons 12y agoAs a python dev, I use pip all the time. My first thought was, "nice, just use pip." I appreciate your comment because it helps remind me that people approach problems from different frames of mind.
- jkbr 12y agoHTTPie has just been added to Homebrew: $ brew install httpie
- SimeVidas 12y agoIs there a curl replacement written in Node (for us Windows users who don't have a proper curl out of the box)?
- krick 12y agoTried it just now and I see non-ascii characters messed up, while curl shows that page fine. Probably there's some case-specific reason for that, but still…