init app over https

I have a jquery/javascript web app. When running on http I can initialize and call the backendless functions no problem, but if I use https equivalent on the same domain then it throws an error when I try and call backendless. I get this error in the output in chrome browser when I try and initialise : Backendless.initApp(APPLICATION_ID, SECRET_KEY, VERSION);

…was loaded over HTTPS, but requested an insecure script ‘http://api.backendless.com/sdk/js/latest/backendless.js’. This request has been blocked; the content must be served over HTTPS.

I came across these 2 posts suggesting to setUrl or serverURL before the init request, but they seem to make no difference.
Backendless.setUrl( “https://api.backendless.com”);
and
Backendless.serverURL = ‘https://api.backendless.com’;

but they seem to make no difference.

Any ideas? I think I am missing something obvious here.

Mike

Hi Mike,

Just make sure you load backendless.js via https (that is in the <script> tag for the library). Once you do that, you do not need to use the setUrl call.

Regards,
Mark

Brilliant, problem solved. I really was missing something obvious!

Thanks Mark