Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
September 10, 2014 Downloading Files in D | ||||
---|---|---|---|---|
| ||||
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. |
September 10, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | 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. |
September 11, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | 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.
|
September 11, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | 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 |
September 11, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | 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?
|
September 11, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | 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...
|
September 11, 2014 Re: Downloading Files in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | 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.. |
Copyright © 1999-2021 by the D Language Foundation