how to use curl to download a file

Mike Parker aldacron at gmail.com
Thu Nov 3 00:31:25 PDT 2011


On 11/2/2011 9:43 PM, Ary Manzana wrote:
> On 11/1/11 11:49 PM, Mike Parker wrote:
>> On 11/2/2011 3:20 AM, Frédéric Galusik wrote:
>>> Hi,
>>>
>>> As the curl documentation is a little bit ...wow.
>>> http://www.digitalmars.com/d/2.0/phobos/etc_c_curl.html
>>>
>>> Do someone have a simple example on how to download a simple file ?
>>>
>>> Thank you.
>>>
>>> ++
>>
>> I don't think we should expect detailed documentation for modules in
>> etc.c. These are interfaces to existing C libraries, not Phobos-specific
>> modules. There's no need to duplicate existing documentation. If you
>> want to learn how to use libcurl, the place to look is the libcurl
>> homepage.
>>
>>
>> http://curl.haxx.se/libcurl/
>
> Wrong.
>
> If you want programmers to use D, give them the solution, now.

It's a D binding to a C library. The interface is the same.

>
> It's not that hard to put a little example at the top of the page
> showing a basic usage.

Wrappers over these libraries should be documented, sure. But for the C 
interface, IMO, a link to the project homepage is sufficient. Any 
differences on the D side should be mentioned, of course. But that's 
all. Otherwise, how many examples should be given? Which functionality 
should be shown? libcurl, specifically, has several examples already 
available from the project page. Adding more to the D docs is redundant.


More information about the Digitalmars-d-learn mailing list