You can create an JScript HTTP client in a similar way to creating an AJAX client in (an old) IE browser, e.g.:
function GET (URL) {
var XmlHttpRequest = Sys["OleObject"]("MSXML2.XMLHTTP.3.0");
XmlHttpRequest.open("GET", URL, false);
XmlHttpRequest.setRequestHeader("Content-Type", "application/json");
XmlHttpRequest.send();
try {
return XmlHttpRequest.responseText;
} catch (e) {
return "Error";
}
}
This example makes a synchronous call to a URL, expecting a JSON response and returning it as a string. You can adapt this basic idea for different content types, POSTs, etc. I don't think it's possible to write this as asynchronous since TestComplete doesn't have the browser's event loop.