develooper Front page | perl.perl5.porters | Postings from December 2021

Re: OpenSSL alternative support WAS Re: Pre-RFC: supporthttpsout-of-the-box

Thread Previous | Thread Next
Craig A. Berry
December 10, 2021 16:40
Re: OpenSSL alternative support WAS Re: Pre-RFC: supporthttpsout-of-the-box
Message ID:
On Fri, Dec 10, 2021 at 6:44 AM Salvador Fandiño <> wrote:
> On 10/12/21 11:37, Nicholas Clark wrote:
> > 2) Are curl and wget likely to be found on Win32? Is there any command line
> >     tool that a HTTP::TIMTOWTDI module can shell out to, to deal with https?
> >
> This works for me on Windows 10:
> bitsadmin /rawreturn /transfer perl /download ^
> ^
>    c:\users\salva\perl2.tgz
> Also, urlmon.dll provides URLDownloadToFile:
>    $d = Win32::API->new(urlmon => URLDownloadToFileA => 'NPPNN', 'N');
>    $d->Call(0, "",
>             'c:\users\salva\perl3.tgz', 0,0);

Those look promising.  It appears that PowerShell's Invoke-WebRequest,
Invoke-RestMethod, and Start-BitsTransfer could all do the job as

Very recent versions of Windows include OpenSSH, but I don't think
it's enabled by default, so sftp is probably not a practical
alternative (if that's even enabled on the server side).

I like the urlmon solution since it doesn't even involve spawning an
external command, but Win32::API is not in core, is it?  So bitsadmin
might be the simplest and most reliable solution.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About