Downloading files over TLS

Adam D. Ruppe destructionator at gmail.com
Fri Jun 26 13:16:44 UTC 2020


On Friday, 26 June 2020 at 10:12:09 UTC, Jacob Carlborg wrote:
> * Arsd [4]. Relies on OpenSSL

Yeah, I've been wanting to change that and use the native apis 
for years but like I just haven't been able to figure out the 
documentation of them.

Though for plain download, on Windows there's a high level 
function you can just call that's relatively easy... just the 
rest of the module needs low level access so it isn't super 
useful.

And of course Mac does it differently, I don't know much about 
there.

> The main problem is that it has been deprecated.

That's the problem of everything Apple makes. Kinda drives me 
nuts trying to keep up with their endless churn and constantly 
Think Different campaigns.

> * Are there any high level APIs, like NSURLSession, on Windows 
> that can be used to download files?

https://docs.microsoft.com/en-us/windows/win32/winhttp/winhttp-sessions-overview

I guess that is more middle level but it isn't too hard to use. I 
think there's a flat out url -> bytes function too but I don't 
remember what it is.

Regardless, the Windows functions may look familiar if you have 
done AJAX - that was based on an IE object which was based on the 
Windows API.


More information about the Digitalmars-d-learn mailing list