dget - getting code from github
Jonas Drewsen
jdrewsen at nospam.com
Sun May 27 11:57:39 PDT 2012
On Saturday, 26 May 2012 at 22:04:34 UTC, Martin Nowak wrote:
> On Sat, 26 May 2012 03:35:13 +0200, Walter Bright
> <newshound2 at digitalmars.com> wrote:
>
>> On 5/25/2012 1:32 AM, Martin Nowak wrote:
>>>> Anyone want to implement such? It ought to be fairly
>>>> straightforward, and will
>>>> be a nice timesaver for a lot of people.
>>>
>>> https://gist.github.com/2786276
>>>
>>> usage:
>>>
>>> rdmd dget dsimcha/TempAlloc libevent
>>
>> How about slapping a Boost license on it and creating a pull
>> request for:
>>
>>
>> https://github.com/D-Programming-Language/tools
>>
>> ?
>
> I will do that after some cleanup.
I saw your comment in the code:
// doesn't work because it already timeouts after 2 minutes
// return get!(HTTP, ubyte)();
You can actually set timeouts using the get function by providing
the HTTP instance as a second parameter to get() e.g.:
auto client = HTTP();
client.dataTimeout = dur!"seconds"(100000);
auto data = get!(HTTP,ubyte)("www.dlang.org", client);
/Jonas
More information about the Digitalmars-d
mailing list