Forum Discussion
Hi,
Can you describe your use case?
TestComplete does not use SSL in any way, thus there is no way to enable or disable it in TC itself.
aqHTTPRequest object can be used to issue both http and https requests, but it is required that all underlying infrastructure is set up properly (valid certificates are installed, proxy is configured, etc.).
Thank you for responding
OK. Here is the code where the Authentication happens within the Header but I believe I need help with a different layer and that is trying to figure out how to get the certificate to be read.
Here is the TC ERROR "An unknown error occurred while processing the certificate."
How do I install the certificate and do I need a proxy? The certificate is currently just sitting on my C: drive
What do you mean by setting up the infrastructure? Is this adding something to the default browser or possibly in TC itself?
try
{
RequestType = aqString.ToUpper(WebServiceData["ServiceType"]);
// Create an aqHttpRequest object
var aqHttpRequest = !equal(WebServiceData["UserName"],undefined) ? aqHttp.CreateRequest(RequestType, WebServiceData["Address"], WebServiceData["UserName"], WebServiceData["Password"]) : aqHttp.CreateRequest(RequestType, WebServiceData["Address"]);
// Specify the Content-Type header value
aqHttpRequest.SetHeader("Content-Type", "application/" + aqString.ToLower(ContentType));
aqHttpRequest.SetHeader("Accept", "application/" + aqString.ToLower(ContentType));
//Added for Authentication
var credentials = aqConvert.VarToStr(dotNET.System.Convert.ToBase64String
(dotNET.System_Text.Encoding.UTF8.GetBytes_2(Project.Variables.SSL_Login + ":" + Project.Variables.SSL_Password)));
aqHttpRequest = aqHttp.CreateGetRequest(WebServiceData["Address"]);
aqHttpRequest.SetHeader("Authorization", "Basic " + credentials);
aqHttpRequest.SetHeader("X-Request-Id", "Andrew");
// Send the request, get an aqHttpResponse object
var aqHttpResponse = (equal(RequestData,"")) ? aqHttpRequest.Send() : aqHttpRequest.Send(RequestData);