Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default Selenium HTTP client factory #877

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.W3CHttpCommandCodec;
import org.openqa.selenium.remote.internal.OkHttpClient;
import org.openqa.selenium.remote.service.DriverService;

import java.io.IOException;
Expand Down Expand Up @@ -70,12 +69,12 @@ public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,

public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,
URL addressOfRemoteServer) {
this(additionalCommands, addressOfRemoteServer, new OkHttpClient.Factory());
this(additionalCommands, addressOfRemoteServer, HttpClient.Factory.createDefault());
}

public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,
DriverService service) {
this(additionalCommands, service, new OkHttpClient.Factory());
this(additionalCommands, service, HttpClient.Factory.createDefault());
}

private <B> B getPrivateFieldValue(String fieldName, Class<B> fieldType) {
Expand Down Expand Up @@ -156,4 +155,4 @@ && getCommandCodec() instanceof W3CHttpCommandCodec) {

return response;
}
}
}