Live data from Hacker News

Curl, 17 years old today

daniel.haxx.se

11–20 of 100 posts

Re: Curl, 17 years old today

#11
I 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.

Re: Curl, 17 years old today

#12
post #4
post #2

I'm surprised it's so new. And wget is only a year older... what did people use before then?

How long have GET/POST commands been around? Probably not as long, but just curious.

The first documented version of HTTP was HTTP V0.9 (1991) has only GET: http://www.w3.org/pub/WWW/Protocols/HTTP/AsImplemented.html

Basic HTTP as defined in 1992 had GET, PUT, HEAD, POST, LINK, TEXTSEARCH, CHECKIN, etc.: http://www.w3.org/Protocols/HTTP/Methods.html

More generic info: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

Re: Curl, 17 years old today

#13
post #5

> Rough estimates say we may have a billion users already. This cannot be true by a long shot. Or am I missing something?

That wouldn't be that surprising depending on what they mean. Assuming that Google or Facebook use curl in various applications, 1 billion sounds about right.

Re: Curl, 17 years old today

#15

I 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.

We just built something[1] similar, but it uses the HAR request object to describe the request.

[1] https://github.com/Mashape/httpsnippet

Re: Curl, 17 years old today

#16

I 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.

curl has a --libcurl option which you can add to a curl command line, and then it'll generate a libcurl-using C code template for that same operation...

Re: Curl, 17 years old today

#19
post #17

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 though, I wish it could use an external downloader (like aria2) and only do the walking and converting links part itself.

Re: Curl, 17 years old today

#20
post #3
post #2

I'm surprised it's so new. And wget is only a year older... what did people use before then?

Those were the early days of HTTP, so no, people didn't really get a lot of HTTP "manually" like that. We used other existing tools to get gopher and ftp though. When I started my work on httpget in 1996, I didn't know about wget and I didn't become aware of it until several years later....

I would figure that by 1997 most people stopped using gopher/archive/veronica. I think I stopped by 1995 or so.

now days we use curl/wget for web dev it seems? probably used it for the same thing back then but I also image that lots of people just used their own ad-hoc scripts or whatever; i wish i had firsthand knowledge of that.

i used wget to download copies of websites when i found one that was mostly documents/images rather than webapps.

Post reply on HN