Live data from Hacker News

HTTPie is a command line HTTP client, a user-friendly cURL replacement

httpie.org

11–20 of 79 posts

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#12
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.

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#13

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.

I'm not sure about httpie but using curl with jq also gives nice formatted and coloured responses.

  curl ... | jq '.'

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#14
post #4

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.

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

While it won't replace Curl, it can prove quite useful while testing APIs.

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#15
post #14
post #4

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.

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 While it won't replace Curl, it can prove quite useful while testing APIs.

Why is the order of the headers different between those two examples?

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#16
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?

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#17
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....

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#18
post #4

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.

Exactly. Seems like a lot of the verbosity that is saved is simply implicitly assuming -i -H 'Content-Type: application/json; charset=utf-8'

Re: HTTPie is a command line HTTP client, a user-friendly cURL replacement

#20
post #14

Earlier quoted context omitted.

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 While it won't replace Curl, it can prove quite useful while testing APIs.

Why is the order of the headers different between those two examples?

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.
Post reply on HN