And still better than wget, which only does http 1.0 and this has problems due to lacking a 'host' header. Curl just works.
> And still better than wget, which only does http 1.0 and this has problems due to lacking a 'host' header. Well I had to check, but this is not true at all: $ nc -l -p 9999 GET / HTTP/1.1 User-Agent: Wget/1.15 (linux-gnu) Accept: */* Host: localhost:9999 Connection: Keep-Alive Also wget can recursively mirror webpages and there are nice options to carefully select contents you want to download. It's quite dated tho…
Curl, 17 years old today
61–70 of 100 posts
Re: Curl, 17 years old today
#62I love curl so much. I just learned that you can 'copy to curl command' from the chrome inspector's network panel by right clicking on any request!! I want to make a library that reads the curl command (and maybe request syntax?) and outputs a function that will do that command.
https://shibukawa.github.io/curl_as_dsl/
Re: Curl, 17 years old today
#63Re: Curl, 17 years old today
#64It's slightly weird to me that I am older than Curl and Wget. They always seemed like Unix Monoliths to me; I had just assumed they had always existed.
Re: Curl, 17 years old today
#65Re: Curl, 17 years old today
#66Earlier quoted context omitted.
Curl is great and all but I don't think this quote makes much sense. Are there examples of services that would, for example, load in a browser but not through curl? I'd think it's rather the opposite since you can through pretty much anything at curl and it will work.
Anything that requires JavaScript to fetch and display content.
/s
Re: Curl, 17 years old today
#67I love curl so much. I just learned that you can 'copy to curl command' from the chrome inspector's network panel by right clicking on any request!! I want to make a library that reads the curl command (and maybe request syntax?) and outputs a function that will do that command.
https://shibukawa.github.io/curl_as_dsl/
Re: Curl, 17 years old today
#68I'm surprised it's so new. And wget is only a year older... what did people use before then?
Sometimes just plain telnet . It wasn't pretty, but it worked: $ telnet 80 GET / It should be noted that the above isn't a strict HTTP request header, it's missing quite a lot of detail, but it works as an example.
Re: Curl, 17 years old today
#69Earlier quoted context omitted.
Anything that requires JavaScript to fetch and display content.
Well somebody tell Google and Facebook, they're probably missing out on a lot of revenue because of their broken websites.
It's perfectly acceptable for Websites to include, and even require the use of, JavaScript. It's also perfectly acceptable to offer a JavaScript client for your API. In fact, you pretty much have to do that if you want your Website to work with the API anyway. What's not OK is for an API to require downloading and using additional JavaScript while the API is being used.
As a contrived (and somewhat ludicrous) example, let's say that I queried "http://foo.com/bars" for some kind of collection. It's OK to return the collection. It's even OK to use an HTTP redirect if the collection actually resides elsewhere: HTTP 302, perhaps, with a Location of "http://foo.com.bazes". What's not OK is to return a line of JavaScript reading "window.location = 'http://foo.com/bazes';" which might work for the browser, but wouldn't work for most other clients.
Re: Curl, 17 years old today
#70> Rough estimates say we may have a billion users already. This cannot be true by a long shot. Or am I missing something?