Uses for cURL
51–60 of 75 posts
Re: Uses for cURL
#52Why do people like cURL? I've regularly found it to have stupid defaults compared to wget. Is it because it's default on Mac and wget isn't?
Seriously how often are you guys performing PUTs and DELETEs manually from the command line? `man` up and write a wrapper.
Re: Uses for cURL
#53Re: Uses for cURL
#54I would strongly suggest HTTPie for the majority of these tasks: https://github.com/jkbr/httpie
Re: Uses for cURL
#55I hope tomorrow I'll see an even more useful article on sending email from the command line! Wow. /sarcasm
I'd be interested to know exactly what you mean (I usually don't really get sarcasm). It seems that you think this advice is useless, or that people never use the command line, or something, but I don't really know what. Could you be more specific? I find it useful to understand different points of view. Thanks
My guess is that caludio believes that good hackers would not find this article interesting. I somewhat agree, as I feel that article adds little to what can already be found in the cURL man page. Having said that, I do think there is worth in having good examples, which this article certainly did.
It's a little disheartening to see this at the top of HN though.
Re: Uses for cURL
#56> If you only care about headers use the -I flag and the response body will be hidden That is actually wrong. The -I flag set the request method to HEAD. So in some cases it will return different headers than a normal get request (and some servers don't implement HEAD responses at all).
alias h='curl -sIX GET -w "Total time: %{time_total} s\n"'
It issues a GET request, only prints the response headers and displays the time it took.Re: Uses for cURL
#57Re: Uses for cURL
#58> With cURL just point the request at your host’s IP address
It's not even necessary to manually look up the IP, since options have precedence:
curl server1.example.com -H Host:\ www.example.net
looks up server1.example.com and connects to that IP with the given Host: Header. Just try the "-v" option to see what's going on.Re: Uses for cURL
#59The site does not work on the iPhone at all if you want to zoom in to read the text. If you start to touch and scroll the menu that was hidden away on the left decides to rear its ugly head and makes the site completely unreadable. I'm pretty frustrated with sites that don't just have a basic two column layout. Is this a template theme? Otherwise why would you waste so much time on a left column that reflows and mess…
Re: Uses for cURL
#60Earlier quoted context omitted.
I'd be interested to know exactly what you mean (I usually don't really get sarcasm). It seems that you think this advice is useless, or that people never use the command line, or something, but I don't really know what. Could you be more specific? I find it useful to understand different points of view. Thanks
Site is "Hacker News", not "How-tos for dummies", last time I checked. Do we really need this kind of stuff in home page? Hardly so. What about an article on how to create a three columns layout with CSS? Or how to edit a file using a text editor? Come on... how to use curl? Really?