Migrated to Curlie [1], `alias http=curlie`, and been happy with it since. Same API, better performance and access to full `curl` flags.
Migrated to Curlie [1], `alias http=curlie`, and been happy with it since. Same API, better performance and access to full `curl` flags.
> If you like the interface of HTTPie but miss the features of curl, curlie is what you are searching for. Curlie is a frontend to curl that adds the ease of use of httpie, without compromising on features and performance. All curl options are exposed with syntax sugar and output formatting inspired from httpie.
So curlie is curl. Thanks for this.
It would be interesting to create an alternative to `http-prompt` [0], using curlie and go-prompt [1] instead of HTTPie and `prompt_toolkit` [2], respectively.
[0]: https://github.com/eliangcs/http-prompt
[1]: https://github.com/c-bata/go-prompt
[2]: https://github.com/prompt-toolkit/python-prompt-toolkit
# time http google.com >/dev/null 2>&1
real 0m0.337s
user 0m0.259s
sys 0m0.036s
# time curlie google.com >/dev/null 2>&1
real 0m0.042s
user 0m0.011s
sys 0m0.005s
# time curl google.com >/dev/null 2>&1
real 0m0.039s
user 0m0.009s
sys 0m0.004sWhat’s the thinking here? If I ask for the headers, wouldn’t I want that on stdout?
Asking a program for info and then getting that info on stderr seems really bizarre to me.
Is this some historical UNIXism?
You could consider headers to be some sort of debug prints..
The info that you're asking the program for is the response body. You're using `curl` / `curlie` primarily to get the response body and then pipe it to the rest of the command. The headers are ancillary.
If the headers were the info you were asking for, eg when running `curl -D -`, then yes they should get printed to stdout. That is not the case being considered here.
When headers are specifically requests with -i for instance, I agree curlie should print them on stdout. PR accepted ;)
I almost forked it to get both outputs into stdout haha