Forum Discussion

fazlook's avatar
fazlook
Frequent Contributor
7 years ago

How to Ignore SSL certificate with aqHttpRequest

Folks,

 

I am using aqHttpRequest to GET/PUT requests of my API. However, how do I ignore SSL certificate ?

 


function httpGetRequest()
{
// var address = "http://now.httpbin.org";
var address = "https://localhost/api/connectiontest";


var aqHttpRequest = aqHttp.CreateGetRequest(address);
// Send the Authorization header with a request
aqHttpRequest.SetHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTM4NCJ9.eyJ1bmlxdWVfbmFtZSI6ImNhdHRlc3RlciIsImlhdCI6IjQvNi8yMDE4IDE3OjA1OjEzICswMDowMCIsInN1YiI6IjNjYjRkMWFmLTA3OTEtNGIxMiOiJodHRwczovLzE3Mi4xNi45MC4xODI6NjUyOSIsImlzcyI6IlVDTUFQSSIsImF1ZCI6IkFueSIsImV4cCI6MTUyMzAzNjExMywibmJmIjoxNTIzMDM0MzEzfQ.Y0djeERzkB71j9VDOGwCBPEsPdM6RdC6mT0zi5BxTFkW1BKvcusnsC6UJ7ym1Upr");


var aqHttpResponse = aqHttpRequest.Send();

// Log the status code of the response
Log.Message(aqHttpResponse.StatusCode);
// Log the text of the response
Log.Message(aqHttpResponse.Text);

// Save a response body to a file
aqHttpResponse.SaveToFile("C:\\body.txt");
}

3 Replies