OL Learn

HTTP Client input - GET pdf from HTTPS server

I’m on Connect 2019.2 and am attempting to use the HTTP Client input task to retrieve PDF files from a remote HTTPS server.

When attempting this I receive the following error:
[0003] W3730 : Error resolving the URL : Error connecting with SSL.

Is the HTTP Client capable of retrieving files via HTTPS?

I tried using it against a couple of the PDF files on the OL Connect help site and got the same error.

For example, if I try to download this PDF file via the HTTP Client I get the error:

The help file for the HTTP Client mentions HTTPS is supported.

Is there a way to do this with the HTTP Client task? Or do I need to shift to scripting cURL or similar utility?

Thanks!

I confirm this issue.

Probably because the remove site doesn’t support SSL (it’s been deprecated for a while, but that plugin still uses it).

The following script will achieve what you want:

var xhr = new ActiveXObject("Microsoft.XMLHTTP");
xhr.open("GET","https://help.objectiflune.com/en/planetpress-workflow-user-guide/2019.2/planetpress-workflow-user-guide.pdf",false);
xhr.send();

var binaryStream = new ActiveXObject("ADODB.Stream")
binaryStream.Type = 1;
binaryStream.Mode = 3;
binaryStream.Open();
binaryStream.Write(xhr.responseBody);
binaryStream.SaveToFile(Watch.GetJobFileName(),2);
binaryStream.Close();