java.lang.Object
org.kohsuke.github.extras.HttpClientGitHubConnector
- All Implemented Interfaces:
GitHubConnector
- Author:
- Liam Newman
-
Field Summary
Fields inherited from interface org.kohsuke.github.connector.GitHubConnector
DEFAULT, OFFLINE
-
Constructor Summary
ConstructorDescriptionInstantiates a new HttpClientGitHubConnector with a default HttpClient.HttpClientGitHubConnector
(HttpClient client) Instantiates a new HttpClientGitHubConnector. -
Method Summary
Modifier and TypeMethodDescriptionsend
(GitHubConnectorRequest connectorRequest) Sends a request and retrieves a raw response for processing.
-
Constructor Details
-
HttpClientGitHubConnector
public HttpClientGitHubConnector()Instantiates a new HttpClientGitHubConnector with a default HttpClient. -
HttpClientGitHubConnector
Instantiates a new HttpClientGitHubConnector.- Parameters:
client
- the HttpClient to be used
-
-
Method Details
-
send
Description copied from interface:GitHubConnector
Sends a request and retrieves a raw response for processing. Implementers ofGitHubConnector.send(GitHubConnectorRequest)
process the information from aGitHubConnectorRequest
to open an HTTP connection and retrieve a raw response. They then return a class that extendsGitHubConnectorResponse
corresponding their response data. Clients should not implement their ownGitHubConnectorRequest
. TheGitHubConnectorRequest
provided by the caller ofGitHubConnector.send(GitHubConnectorRequest)
should be passed to the constructor ofGitHubConnectorResponse
.- Specified by:
send
in interfaceGitHubConnector
- Parameters:
connectorRequest
- the request data to be sent.- Returns:
- a GitHubConnectorResponse for the request
- Throws:
IOException
- if there is an I/O error
-