News for hackers. Stuff that matters.
Re:HTTPie: A cURL-like tool for humans by jcromartie on Wednesday July 18, 2012 @01:07PM (#4261682)
If by "for humans" you mean "for programmers who mostly use JSON". I have to say I'm not sending JSON with cURL too often, compared to any other payload. And when I do send JSON it's more complex than a flat set of keys and values.
Re:HTTPie: A cURL-like tool for humans by jkbr on Wednesday July 18, 2012 @01:36PM (#4261855)
There is more to it than that. It provides an expressive syntax to construct all sorts of requests. You can submit forms, upload files and set headers without having to use flags. You also get syntax highlighting, ability to pipe in request data, etc.

If you are sending complex JSON, it's probably stored in a file or it's the output of another program:

    http PUT httpbin.org/put @/data/test.json

    http -b localhost:8888/couchdb/ | http PUT httpbin.org/put
Re:HTTPie: A cURL-like tool for humans by zeroonetwothree on Wednesday July 18, 2012 @03:00PM (#4262299)
I don't really think curl is much harder, e.g.

curl -X PUT -d @data/test.json httpbin.org/put

It also has the advantage that it supports all the options you might ever need, for example http authentication and proxies are often useful.

Re:HTTPie: A cURL-like tool for humans by tripzilch on Friday July 20, 2012 @09:21PM (#4273615)
It has the disadvantage that it's not at all obvious what it does unless I open up the man page.
Re:HTTPie: A cURL-like tool for humans by jkbr on Wednesday July 18, 2012 @04:05PM (#4262640)
HTTPie also supports proxies and HTTP auth (see --proxy and -a/--auth).
Re:HTTPie: A cURL-like tool for humans by shazow on Wednesday July 18, 2012 @10:26PM (#4264112)
Doesn't support socks 4/5 proxies. :)

Requests and urllib3 have a long way to go to be complete competitors with cURL.

P.S. Good job nonetheless. Seems like a good idea to make a specialized HTTP CLI client for JSON/RESTful services.

Re:HTTPie: A cURL-like tool for humans by Camillo on Wednesday July 18, 2012 @01:49PM (#4261923)
Why not use JSON syntax for JSON instead of introducing your own, though?
Re:HTTPie: A cURL-like tool for humans by jkbr on Wednesday July 18, 2012 @02:08PM (#4262019)
You can still use regular JSON syntax, if you like:

    echo '{"foo": "bar"}' | http url
The reason for having the simplified one is that it's less verbose and usually doesn't even require you to quote it:

    http url foo=bar
Re:HTTPie: A cURL-like tool for humans by javajosh on Wednesday July 18, 2012 @02:43PM (#4262199)
Yeah, most of us would forget to single quote the JSON. It is definitely more verbose too - I agree with the command-line compatible simplification.
Re:HTTPie: A cURL-like tool for humans by raffi on Wednesday July 18, 2012 @01:49PM (#4261918)
I think the tool looks useful. I'd appreciate something like this for manually poking web servers when conducting a security assessment.

[Edit: removed HN snarky comment]