www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Downloading Files in D

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
What's the recommended way to to download files (typically over 
http(s) or ftp) from within D? Should I use

http://dlang.org/phobos/std_net_curl.html

or

vibed.org

?

I'm asking because I've read somewhere that there have been 
complaints about the curl wrapper.
Sep 10 2014
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
The curl one should be easiest for just downloading files. The 
big problems with it are that it can be a pain to get the library 
working with versioning and stuff and that it sometimes does the 
wrong thing in advanced use cases.

But if the curl library works for you at all, doing downloading 
with it is easy.
Sep 10 2014
parent =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 10 September 2014 at 22:23:11 UTC, Adam D. Ruppe 
wrote:
 The curl one should be easiest for just downloading files. The 
 big problems with it are that it can be a pain to get the 
 library working with versioning and stuff and that it sometimes 
 does the wrong thing in advanced use cases.

 But if the curl library works for you at all, doing downloading 
 with it is easy.
Ok, thanks.
Sep 11 2014
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 11/09/14 00:05, "Nordlöw" wrote:

 I'm asking because I've read somewhere that there have been complaints
 about the curl wrapper.
If you don't want to worry about dependencies on libcurl you can use Tango [1] [2]. You can see how I use Tango to download files in DVM [3] [1] https://github.com/SiegeLord/Tango-D2 [2] http://siegelord.github.io/Tango-D2/tango.net.http.HttpGet.html [3] https://github.com/jacob-carlborg/dvm/blob/master/dvm/commands/Fetch.d#L80 -- /Jacob Carlborg
Sep 11 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Thursday, 11 September 2014 at 14:30:39 UTC, Jacob Carlborg 
wrote:
 If you don't want to worry about dependencies on libcurl you 
 can use Tango [1] [2]. You can see how I use Tango to download 
 files in DVM [3]
Ok, thanks. And I guess vibe.d can do this aswell without external dependencies, right?
Sep 11 2014
next sibling parent "Danyal Zia" <catofdanyal yahoo.com> writes:
On Thursday, 11 September 2014 at 17:37:24 UTC, Nordlöw wrote:
 Ok, thanks. And I guess vibe.d can do this aswell without 
 external dependencies, right?
I'm also interested to know how this can be done with vibe.d...
Sep 11 2014
prev sibling parent "Rene Zwanenburg" <renezwanenburg gmail.com> writes:
On Thursday, 11 September 2014 at 17:37:24 UTC, Nordlöw wrote:
 On Thursday, 11 September 2014 at 14:30:39 UTC, Jacob Carlborg 
 wrote:
 If you don't want to worry about dependencies on libcurl you 
 can use Tango [1] [2]. You can see how I use Tango to download 
 files in DVM [3]
Ok, thanks. And I guess vibe.d can do this aswell without external dependencies, right?
Didn't test but I found this: http://vibed.org/api/vibe.inet.urltransfer/download Vibe does by default depend on a few other libraries though. Libevent, OpenSSL, maybe others..
Sep 11 2014