I am using plugins.http.createNewHttpClient() to consume a .NET Web API deployed on a server, unfortunately due to my companies security regulations everything must be certified (https).
I am using the following code to communicate with the site;
var client = plugins.http.createNewHttpClient();
var encodePlainURI= encodeURI(URI);
var getRequest = client.createGetRequest(encodePlainURI);
var getResponse = getRequest.executeRequest();
var getStatusCode = getResponse.getStatusCode();
If the URI is sent via HTTP then everything is good, status code is 200 'ok', but using HTTPS it just returns null.
I understand that this is down to java certificates and have followed the instructions in https://wiki.servoy.com/display/public/tutorials/Import+a+%28Root%29+certificate+in+the+java+cacerts+file to install them, still no luck.
The following is a text snippet from the Servoy http plugins manual ...
If this url is an https url that uses certificates unknown to Java
then you have to use the HttpClient so that smart client users will get the unknown certificate dialog that they then can accept
or you must make sure that those server certificates are stored in the cacerts of the java vm that is used (this is required for a web or headless client)
Now to me this indicates that the user can resolve this, as a dialog box will prompt them to authenticate, unfortunately this does not appear like it says it will.
I have already tried installing the certificates myself, but as already said above, no luck.
If anyone has step by step instructions for this it would be greatly appreciated, it's holding me back quite a bit and there's virtually no previous online support found anywhere.