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?


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");

var binaryStream = new ActiveXObject("ADODB.Stream")
binaryStream.Type = 1;
binaryStream.Mode = 3;

Hi Phil,

I am getting the same Error as above when using the HTTP Input Client to try to download a PDF from a URL that requires Authentication.

Could your script above be modified to pass credentials to the download site?


If the server accepts Basic Authentication, then all you have to do is add the following line immediately before the xhr.send(); line:

xhr.setRequestHeader("Authorization", "Basic " + btoa(USER_NAME+":"+USER_PASSWORD));

Make sure your script language is set to Enhanced JScript (i.e. not the standard JScript, which does not implement the btoa() method).

And, obviously, set the USER_NAME and USER_PASSWORD values to match your credentials.