Earlier quoted context omitted.
> 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.…
Random plug: Another invaluable tool for API analysis is http://mitmproxy.org .
Curl vs. Wget
181–190 of 205 posts
Re: Curl vs. Wget
#182Earlier quoted context omitted.
Stupid question, but how do things like this resume from where they left off? Wouldn't the server need to be cooperating in this? Is that build into HTTP?
Yes the server would need to support it. The request is made via a HTTP header (Range[1] IIRC). Also, I wouldn't consider that a stupid question. :) [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#Rang...
Re: Curl vs. Wget
#183Also 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
Re: Curl vs. Wget
#184Earlier quoted context omitted.
You specify a byte "range" when requesting a file via HTTP from the server. Not all servers support this, but most do these days. #Edit. More info here: https://en.wikipedia.org/wiki/Byte_serving
Just looked that up, that's a rather limited usefulness. The multi homed usage makes sense but feels out of place really.
Re: Curl vs. Wget
#185Earlier quoted context omitted.
it acts like a live packet capture of a log file. not sure how else to describe other than I do not think wget is capable of such functionality.
sooo... "wget -O - .... | grep ..." ?
typically I use wget to download, and curl to troubleshoot http https.
however, if that is capable of keeping everything open I suppose thats a point for wget.
Re: Curl vs. Wget
#186Earlier quoted context omitted.
> 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.…
Random plug: Another invaluable tool for API analysis is http://mitmproxy.org .
Re: Curl vs. Wget
#187For 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…
curl is the one where I have to remember whether to use -o or -O when trying to download a file with the original filename and just use wget instead because it's faster than reading the curl man page.
bropages is where it's at for that kind of stuff. curl is actually their usage example :)
Re: Curl vs. Wget
#188Earlier quoted context omitted.
Yes, wget is fantastic for mirroring www and ftp sites and I use it a lot for that purpose. It's magic [0]. I hadn't realized that it didn't support compression though, which might explain why it's so slow in some cases. Not normally a problem as it just runs in the background on a schedule. Curl supports gzip and deflate. It would be great if support for sdch and br were added too. Brotli is in Firefox 44 and can be…
The Win64 latest version of curl doesn't seem to support gzip nor deflate. I have to remove those options when copying from Chrome developer tools and pasting into a script. I'd report a bug but their page doesn't seem to have an obvious link.
Re: Curl vs. Wget
#189wget has the amazing flag `--page-requisites` though, which downloads all of an html documents' css and images that you might need to display it properly. Lifesaver.
wget has another great flag, -k, which changes references to the css, js, and images to absolute URLs, resulting in a 1 page download that still looks like the original page. It's useful for making dummy pages for clients. I wish curl had this for my OSX friends who need the functionality above. Getting a wget binary onto OSX is a pain but curl is there by default.
Re: Curl vs. Wget
#190For 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…
I totally agree except over the years I have been using aria2 more and more instead of wget. aria2 supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink with the same sane wget syntax and defaults. example $ aria2c http://yourlink.com/file.* -x2 allows using 2 connections per host. https://aria2.github.io/