I have code as below
RemoteWebDriver driver = new RemoteWebDriver(new HttpCommandExecutor(new HashMap<String, CommandInfo>(),
new URL(URL), new Factory() {
private HttpClientBuilder builder;
{
builder = HttpClientBuilder.create();
HttpHost proxy = new HttpHost(proxy,proxyport);
System.out.println(proxy);
builder.setProxy(proxy);
System.out.println(builder);
}
@Override
public HttpClient createClient(URL url) {
return new ApacheHttpClient(builder.build(), url);
}
but as the ApacheHttpClient class has been deprecated what is the alternative for ApacheHttpClient class to use in the above code