Package org.kohsuke.github.internal
Class DefaultGitHubConnector
java.lang.Object
org.kohsuke.github.internal.DefaultGitHubConnector
Internal class that selects what kind of
GitHubConnector
will be the default.
Allows behavior to be changed for different versions of Java, such as supporting Java 11 HttpClient.- Author:
- Liam Newman
-
Method Summary
Modifier and TypeMethodDescriptionstatic GitHubConnector
create()
Creates aGitHubConnector
that will be used as the default connector.
-
Method Details
-
create
Creates aGitHubConnector
that will be used as the default connector. This method currently defaults to returning an instance ofGitHubConnectorHttpConnectorAdapter
. This preserves backward compatibility withHttpConnector
.For testing purposes, the system property
test.github.connector
can be set to change the default. Possible values:default
,okhttp
,httpconnector
.Should only be called to set
GitHubConnector.DEFAULT
.- Returns:
- a GitHubConnector
-