Live data from Hacker News

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

httpie.org

21–30 of 79 posts

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

#21

Earlier quoted context omitted.

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.

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.

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

#22

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 '.'

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.

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

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

HTTPie sorts them before outputted.

In the readme: https://github.com/jakubroztocil/httpie#colors-and-formattin...

In the code: https://github.com/jakubroztocil/httpie/blob/master/httpie/o...

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

#24

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 smooth…

I'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)

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

#25

Earlier quoted context omitted.

That was my first thought, too. Then I saw the colorized output and I'm convinced, too.

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.

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.

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

#26

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.

You could use our Share URLs which would let the people you share defects with reproduce them for themselves: https://www.runscope.com/docs/sharing

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

#28
post #22

Earlier quoted context omitted.

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

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.

Awesome, thanks!

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

#29

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 smooth…

Another one - crossplatform http interception proxy like Fiddler - called mitmproxy. It has a great feature - it can transparently handle https traffic.

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

#30

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 smooth…

WinMerge is not that good. BeyondCompare is in a league of it's own when it comes with diff apps (it's commercial though).

I can vouch for the rest too....ConEmu especially is very very nice.

Post reply on HN