by pilif · 11y ago · 0 comments
It also follows unix conventions in option placement and syntax, so there's never any cognitive hurdle to cross when the question arises where to put headers, where to put form data, where to put query string data, how to handle the case of query string data being supplied using overlapping methods and what the form data is encoded in.
It also doesn't force me to write json in yet another syntax that's command-line friendly. Instead I can just write json.
Yes. HTTPie looks nicer, but the wide availability of curl and the much more predictable syntax make it a better tool for my taste.
If I need formatted JSON output, I can always pipe the result in to jq.
Without jq, you can still pipe to python json.tool module:
$ curl http://domain.com | python -m json.tool
1. jq project page: https://stedolan.github.io/jq/
2. jq HN Discussion: https://news.ycombinator.com/item?id=9446980
This comment from the jq HN submission discusses httpie, jq, and httpie vs. curl: https://news.ycombinator.com/item?id=9447175
Using only tools based on ubiquity is rather short sighted.