both std.net.curl and hunt http clients fail

drenoob dlang at none.org
Thu Jun 12 15:18:16 UTC 2025


On Thursday, 12 June 2025 at 14:32:07 UTC, Lance Bachmeier wrote:
> On Thursday, 12 June 2025 at 13:16:13 UTC, drenoob wrote:
>
> [...]
>
>> Sorry, dear colleagues, while I still presume D be a *stable* 
>> and really decent language and very much welcome the fact that 
>> at least many libraries are not version 0.0.[whatever small 
>> number] (so basically alpha or beta at best), I hope you can 
>> understand that this first experience isn't exactly 
>> strengthening my hopes for and trust in the D universe ...
>>
>> Or did I make a total noob mistake? If so (or even if not) 
>> please kindly let me know how to get some decent http client 
>> working.
>>
>> Btw. DMD and dub have been freshly installed and should be 
>> current.
>>
>> Thank you
>
> Well, this is actually a problem of the documentation omitting 
> a critical detail. If you run that code inside a function, it 
> works:
>
> ```
> void main() {
>  // Insert all of your code here
> }
> ```

Yep, now it suddenly works. Hurray!

Thanks a lot!

P.S. But I'll have a closer look at the requestes lib suggested 
by @Serg Gini as well, because it look interesting.



More information about the Digitalmars-d mailing list