Live data from Hacker News

HTTPie: A cURL-like tool for humans

github.com

11–20 of 88 posts

Re: HTTPie: A cURL-like tool for humans

#11
The UI for curl is awful (--request to change the method??) and wget's is only slightly better, but they do have the advantage of ubiquity, and it's often useful to email/Skype complete curl or wget command lines about the place to explain how to use an API, or demonstrate problems.

(e.g. Stripe and others document their API in terms of curl commands: https://stripe.com/docs/api.)

I do wish the curl UI was better, but I can't see it being trivially replaced. (It's a similar issue with git: bad UI, but every git question and answer is described in terms of the CLI, so even if you prefer a GUI client, say, you still need to be able to formulate your problem in CLI terms for anyone on stackoverflow to understand you.)

Re: HTTPie: A cURL-like tool for humans

#13
post #10

I was looking for something like this a while back and found a useful firefox plugin called Poster ( https://addons.mozilla.org/en-us/firefox/addon/poster/ ). It's useful for testing a RESTful api without creating any front-end code to handle the requests. Or anything you can do with cURL just simpler.

I wrote a similar one for chrome https://chrome.google.com/webstore/detail/cdjfedloinmbppobah...

Re: HTTPie: A cURL-like tool for humans

#15
post #5

It looks great! I see no reason to slight cURL, though. Its CLI was intended for humans.

It's not meant to be an insult on cURL. cURL is a great library/tool and supports way more than HTTP, but the command line interface simply isn't as convenient for common HTTP as it could be. The "for humans" slogan is borrowed from the underlying python-requests library and is meant to communicate that good UX is one of the top priorities of the project. Glad you like it!

Re: HTTPie: A cURL-like tool for humans

#17
For website scraping, something like casperjs/phantomjs or selenium are more suitable, since they emulate a browser and evaluate javascript, which curl cannot, and it is not clear if this tool can.

What are the use cases where curl is more suitable than phantomjs or selenium?

Re: HTTPie: A cURL-like tool for humans

#18
post #17

For website scraping, something like casperjs/phantomjs or selenium are more suitable, since they emulate a browser and evaluate javascript, which curl cannot, and it is not clear if this tool can. What are the use cases where curl is more suitable than phantomjs or selenium?

phantomjs doesn't just emulate a browser, it uses WebKit.

Re: HTTPie: A cURL-like tool for humans

#19
post #17

For website scraping, something like casperjs/phantomjs or selenium are more suitable, since they emulate a browser and evaluate javascript, which curl cannot, and it is not clear if this tool can. What are the use cases where curl is more suitable than phantomjs or selenium?

APIs. Lots of HTTP usage is not browser-related.

Re: HTTPie: A cURL-like tool for humans

#20
post #15
post #5

It looks great! I see no reason to slight cURL, though. Its CLI was intended for humans.

It's not meant to be an insult on cURL. cURL is a great library/tool and supports way more than HTTP, but the command line interface simply isn't as convenient for common HTTP as it could be. The "for humans" slogan is borrowed from the underlying python-requests library and is meant to communicate that good UX is one of the top priorities of the project. Glad you like it!

I don't think it's the most obvious kind of good UX, but rather good UX for people who value expressiveness, like ruby programmers. The items that change meaning based on symbols are quick to type, but it comes at the cost of clarity. curl's paramters aren't very clear either, and since it supports more than just HTTP, it's harder to go through the man page with all that it supports. I think there's still room for one that uses option names/letters to differentiate between headers and body properties rather than symbols.
Post reply on HN