private HttpClient newClient() {
    HttpClient.Builder builder = HttpClient.newBuilder();
    builder.followRedirects(HttpClient.Redirect.NORMAL);
    if (myProxyInfo != null && !myProxyInfo.isNoProxy()) {
      configureProxy(builder, myProxyInfo);
    }
    if (mySSLContext != null) {
      builder.sslContext(mySSLContext);
    }
    return builder.build();
  }
private HttpClient newClient()