I am using com.google.api.client.http.HttpRequest object to hit a URL for Akamai Purge. However, I am getting an SSL Handshake error but as it is in a lower environment so I am allowed to ignore this. There are multiple examples on the internet ignoring SSL Handshake for Spring REST Template and Apache HTTPRequest. But I could not find much on google HttpRequest. I need a way to ignore SSL Cert in my code. Below is my code:
'''
HttpTransport httpTransport = new ApacheHttpTransport();
HttpRequestFactory requestFactory = httpTransport.createRequestFactory();
URI uri = URI.create(url1);
String requestBody = "{\"objects\": [471642]}";
HttpRequest request = requestFactory.buildPostRequest(new GenericUrl(uri),
ByteArrayContent.fromString("application/json", requestBody));
GoogleHttpClientEdgeGridRequestSigner requestSigner = new GoogleHttpClientEdgeGridRequestSigner(credential);
requestSigner.sign(request);
HttpResponse response = request.execute();
'''