
HTTPie is a command line HTTP client, a user-friendly cURL replacement - grhmc
http://httpie.org
======
suprgeek
This 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....

~~~
aleem
I have moved away from windows and miss Fiddler the most. It's ability to
record, filter, edit and replay requests made debugging a breeze.

~~~
13throwaway
I like Mitmproxy. [http://mitmproxy.org](http://mitmproxy.org)

------
halayli
I'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
Httpie 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
Why is the order of the headers different between those two examples?

~~~
notdonspaulding
I 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
That 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
Requests does use an ordered dictionary for handling headers.

~~~
0xhex
Requests might but that's irrelevant. Requests is built on top of urllib3
which is built on top of httplib which does use a plain dict. Also the
relevant RFC says order is irrelevant.

~~~
jacquesm
Debugging starts with having an accurate representation of what is going on.

~~~
oneeyedpigeon
Ok, so this tool is only for all the situations in which you don't care about
header order.

------
cobralibre
I 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
I'm not sure about httpie but using curl with jq also gives nice formatted and
coloured responses.

    
    
      curl ... | jq '.'

~~~
acdha
jq 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
Awesome, thanks!

------
barosl
Determining 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.

------
todd3834
At 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
That was my first thought, too. Then I saw the colorized output and I'm
convinced, too.

~~~
laurent123456
Isn'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
This 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.

------
aikah
Somehow 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?

------
_RPM
While I don't think it will EVER replace curl, it does seem like a fun piece
of software to play around with. Great job!

------
kernel_panic
This 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-f...](http://runnable.com/U5wOrMxHLYsVkYbX/basic-httpie-examples-for-
curl)

------
bdevine
The 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!

------
lukasm
Instead of curl I was usually writing
[https://github.com/kennethreitz/requests](https://github.com/kennethreitz/requests)

~~~
paulannesley
That's what httpie uses internally:
[https://github.com/jakubroztocil/httpie/blob/77955c9837259b1...](https://github.com/jakubroztocil/httpie/blob/77955c9837259b1159e87d4a47bd67d47b1c7d6d/setup.py#L32)

------
krick
Tried 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…

------
hcarvalhoalves
Now 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?

------
tomphoolery
Big fan of this one. HTTPie is a lovely replacement for cURL, especially when
you just want to quickly test a JSON API.

------
SimeVidas
Is there a curl replacement written in Node (for us Windows users who don't
have a proper curl out of the box)?

------
aroch
D'oh! HTTPie doesn't support SNI

~~~
0x006A
If you use Python 2.x and need to talk to servers that use SNI (Server Name
Indication) you need to install some additional dependencies:

$ pip install --upgrade pyopenssl pyasn1 ndg-httpsclient

~~~
aroch
Ah, I'm not a python man. Thanks for the heads up

------
amrit_b
I use this tool on a regular basis and just love it. Thanks for building
HTTPie :)

------
tilltheis
Is there any chance get this into Homebrew for an easier installation on Mac?

~~~
tim333
I just installed it on my mac by doing $ sudo pip install httpie

It was not too tricky

~~~
tilltheis
Sure, but i dislike installing other tools like pip just for a single tool.

~~~
sethammons
As 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.

------
fibertera
Tried it, works great! Nice work!!

------
nroose
I will keep using wget.

------
hernan604
HTTP::Tiny

------
_nullandnull_
Poor choice of name. All I can see is HTTP Internet Explorer.

~~~
jfe
ditto. HTTPy would have been better, methinks.

~~~
creeble
'hc' might have made it successful, at least then it would have one benefit
over curl.

