Class HttpClientSubmitter
java.lang.Object
io.github.projectunified.faststats.httpclient.HttpClientSubmitter
- All Implemented Interfaces:
Submitter
-
Nested Class Summary
Nested classes/interfaces inherited from interface Submitter
Submitter.Response -
Field Summary
Fields inherited from interface Submitter
DEFAULT_BASE_URL -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientSubmitter(String token) Constructs a newHttpClientSubmitterwith standardHttpClient.HttpClientSubmitter(java.net.http.HttpClient httpClient, String token) Constructs a newHttpClientSubmitterwith standardHttpClient.HttpClientSubmitter(java.net.http.HttpClient httpClient, String baseUrl, String token, String userAgent) Constructs a newHttpClientSubmitter. -
Method Summary
Modifier and TypeMethodDescriptionExecutes the HTTP request and returns the response context.
-
Constructor Details
-
HttpClientSubmitter
Constructs a newHttpClientSubmitterwith standardHttpClient.- Parameters:
token- the authorization token (bearer)
-
HttpClientSubmitter
Constructs a newHttpClientSubmitterwith standardHttpClient.- Parameters:
httpClient- the HttpClient instance to usetoken- the authorization token (bearer)
-
HttpClientSubmitter
public HttpClientSubmitter(java.net.http.HttpClient httpClient, String baseUrl, String token, String userAgent) Constructs a newHttpClientSubmitter.- Parameters:
httpClient- the HttpClient instance to usebaseUrl- the base URLtoken- the authorization token (bearer)userAgent- the user agent header value
-
-
Method Details
-
execute
Description copied from interface:SubmitterExecutes the HTTP request and returns the response context.
-