JavaScript
JavaScript
HTTPS GET using SSL/TLS
See more HTTP Examples
To retrieve a resource using SSL/TLS (i.e. HTTPS), simply use a URL that begins with "https://". (This applies to any Chilkat HTTP method that has a URL argument, such as QuickGetStr, GetHead, QuickDeleteStr, etc.)
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var http = new CkHttp();
// Send the HTTP GET and return the content in a string.
var html = http.QuickGetStr("https://www.chilkatsoft.com/helloWorld.json");
if (http.LastMethodSuccess == false) {
console.log(http.LastErrorText);
return;
}
console.log(html);