I am trying to trigger a Get request to a URL using HTTPURLConnection. Before this I am setting truststore and keystore certificates along with password using System.setProperty(javax.net.ssl.trustStore), System.setProperty(javax.net.ssl.keyStore). When I trigger the request for the 1st time, I am getting 403 error. But when I am trying for the 2nd time, i am getting valid response. I need to get the request success for the 1st time itself. What should I do

I tried with both Java 8 and 11, same issue seen in both

0

There are 0 best solutions below