Live data from Hacker News

Curl vs. Wget

daniel.haxx.se

101–110 of 205 posts

Re: Curl vs. Wget

#101

Also putting this out there—for nicer REST API interaction on the CLI, and a little more user-friendliness, you might also want to add HTTPie[1] to your toolbelt. It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances. [1] https://github.com/jkbrzt/httpie

This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie

I had the same quibble, was going to write my own but found and now use bat.

https://github.com/astaxie/bat/blob/master/README.md

I don't use Windows but I also dislike python dependencies if I can get away with just needing libc.

Re: Curl vs. Wget

#102

Also putting this out there—for nicer REST API interaction on the CLI, and a little more user-friendliness, you might also want to add HTTPie[1] to your toolbelt. It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances. [1] https://github.com/jkbrzt/httpie

This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie

I use the Babun Shell [0] on Windows desktops to provide an environment for tools more typically found and used in a Unix-like environment.

I know it's not the same as installing a tool natively, but it lets me a) use some tools pretty much in the way I prefer to do so and b) check out stuff that I see on HN (and elsewhere) without a PITA install.

Installing was a one line deal if pip is installed (pip install --upgrade httpie), which in turn was a one line installation (wget https://bootstrap.pypa.io/get-pip.py -O - | python)

That's pretty close to one line.

[0] https://babun.github.io/

Re: Curl vs. Wget

#103
I like Wget's option to continue a file download if it gets interrupted. I believe you can achieve the same thing in curl but its not as simple as just setting a flag (-c).

Re: Curl vs. Wget

#104
post #77
post #47

Earlier quoted context omitted.

Merge the code, hard link the filenames to the same executable and get it to change behavior based on the name it's invoked under.

No need to merge code. Take curl as is, and set different defaults based on executable name.

[deleted]

Re: Curl vs. Wget

#105

For my usage: * Wget's the interactive, end-user tool, and my go-to if I just need to download a file. For that purpose, its defaults are more sane, its command line usage is more straightforward, its documentation is better-organized, and it can continue incomplete downloads, which curl can't. * Curl's the developer tool-- it's what I'd use if I were building a shell script that needed to download. The command line…

Huh. I've always thought of them as the opposite - wget is the full featured spidering tool, curl is the easy to run one when I need a command line thing or to bang web stuff into a janky copy and paste workflow.

Re: Curl vs. Wget

#106
Since aria2 was only passingly mentioned, let me list some of its features:

- Supports splitting and parallelising downloads. Super handy if you're on a not-so-good internet connection.

- Supports bittorrent.

- Can act as a server and has a really nice XML/JSON RPC interface over HTTP or WebSocket (I have a Chrome plugin that integrates with this pretty nicely).

They're not super important features sure but I stick with it because it's typically the fastest tool and I hate waiting.

Re: Curl vs. Wget

#107

For my usage: * Wget's the interactive, end-user tool, and my go-to if I just need to download a file. For that purpose, its defaults are more sane, its command line usage is more straightforward, its documentation is better-organized, and it can continue incomplete downloads, which curl can't. * Curl's the developer tool-- it's what I'd use if I were building a shell script that needed to download. The command line…

> This doesn't really need to be an "emacs vs. vim" or "tabs vs. spaces"-type dichotomy: wget and curl do different things well and there's no reason why both shouldn't coexist in one's workflow.

Totally agree. I love curl for testing API request/responses manually. It's usually a huge part of navigating my way around a new API that doesn't have a client library available for whatever language I'm using at that time.

I also use it for weird requests that need special headers or authentication.

Wget is the first thing I turn to when I'm downloading anything remote from the command line or scraping some remote content for analysis.

Re: Curl vs. Wget

#108

For my usage: * Wget's the interactive, end-user tool, and my go-to if I just need to download a file. For that purpose, its defaults are more sane, its command line usage is more straightforward, its documentation is better-organized, and it can continue incomplete downloads, which curl can't. * Curl's the developer tool-- it's what I'd use if I were building a shell script that needed to download. The command line…

Interestingly, I've somewhat replace my usual curl calls with HTTPie, at least on my mac; for distributed scripts it's still curl all the way.

Re: Curl vs. Wget

#110
post #93

Earlier quoted context omitted.

Haven't found anything better than axel to saturate the link yet.

Try saldl[1]. It depends on libcurl. So protocol support should be good and reliable. [1] https://github.com/saldl/saldl

https://github.com/saldl/saldl/wiki/saldl_vs._aria2
Post reply on HN